Commit Graph

43 Commits

Author SHA1 Message Date
Spencer Ahrens 11b515b1b0 [ReactNative] clean lint in all of Libraries/ 2015-05-19 13:47:04 -08:00
Luke de27f1db54 fix exception when ES6 class with no propTypes defined before calling requireNativeComponent
Summary:
Closes https://github.com/facebook/react-native/pull/1260
Github Author: Luke <kejinlu@gmail.com>

Test Plan: Created `class Foo extends React.Component` and made sure error messages were good.
2015-05-18 11:47:42 -08:00
Spencer Ahrens 4771806c44 [ReactNative] Fix some mount callback issues 2015-05-15 10:59:09 -08:00
Spencer Ahrens 6e179fb7cd [ReactNative] introduce mountSafeCallback
Summary:
`mountSafeCallback` simply wraps a callback in an `isMounted()` check to prevent crashes when old callbacks are called on unmounted components.

@public

Test Plan:
Added logging and made sure callbacks were getting called through
`mountSafeCallback` and that things worked (e.g. photo viewer rotation etc).
2015-05-13 18:36:53 -08:00
Ben Alpert a0440daf98 [react-native] Codemod .getNodeHandle, .getNativeNode to React.findNodeHandle 2015-05-13 13:24:37 -07:00
Krzysztof Magiera ff00e1496c [ReactNative] Rename ReactIOS JS module (and relatives) to ReactNative. 2015-05-13 13:24:35 -07:00
Spencer Ahrens 1ef4e00fba [ReactNative] Introduce onLayout events
Summary:
Simply add an `onLayout` callback to a native view component, and the callback
will be invoked with the current layout information when the view is mounted and
whenever the layout changes.

The only limitation is that scroll position and other stuff the layout system
isn't aware of is not taken into account.  This is because onLayout events
wouldn't be triggered for these changes and if they are desired they should be
tracked separately (e.g. with `onScroll`) and combined.

Also fixes some bugs with LayoutAnimation callbacks.

@public

Test Plan:
- Run new LayoutEventsExample in UIExplorer and see it work correctly.
- New integration test passes internally (IntegrationTest project seems busted).
- New jest test case passes.

{F22318433}

```
2015-05-06 15:45:05.848 [info][tid:com.facebook.React.JavaScript] "Running application "UIExplorerApp" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF"
2015-05-06 15:45:05.881 [info][tid:com.facebook.React.JavaScript] "received text layout event
", {"target":27,"layout":{"y":123,"x":12.5,"width":140.5,"height":18}}
2015-05-06 15:45:05.882 [info][tid:com.facebook.React.JavaScript] "received image layout event
", {"target":23,"layout":{"y":12.5,"x":122,"width":50,"height":50}}
2015-05-06 15:45:05.883 [info][tid:com.facebook.React.JavaScript] "received view layout event
", {"target":22,"layout":{"y":70.5,"x":20,"width":294,"height":204}}
2015-05-06 15:45:05.897 [info][tid:com.facebook.React.JavaScript] "received text layout event
", {"target":27,"layout":{"y":206.5,"x":12.5,"width":140.5,"height":18}}
2015-05-06 15:45:05.897 [info][tid:com.facebook.React.JavaScript] "received view layout event
", {"target":22,"layout":{"y":70.5,"x":20,"width":294,"height":287.5}}
2015-05-06 15:45:09.847 [info][tid:com.facebook.React.JavaScript] "layout animation done."
2015-05-06 15:45:09.847 [info][tid:com.facebook.React.JavaScript] "received image layout event
", {"target":23,"layout":{"y":12.5,"x":82,"width":50,"height":50}}
2015-05-06 15:45:09.848 [info][tid:com.facebook.React.JavaScript] "received view layout event
", {"target":22,"layout":{"y":110.5,"x":60,"width":214,"height":287.5}}
2015-05-06 15:45:09.862 [info][tid:com.facebook.React.JavaScript] "received text layout event
", {"target":27,"layout":{"y":206.5,"x":12.5,"width":120,"height":68}}
2015-05-06 15:45:09.863 [info][tid:com.facebook.React.JavaScript] "received image layout event
", {"target":23,"layout":{"y":12.5,"x":55,"width":50,"height":50}}
2015-05-06 15:45:09.863 [info][tid:com.facebook.React.JavaScript] "received view layout event
", {"target":22,"layout":{"y":128,"x":60,"width":160,"height":337.5}}
```
2015-05-07 12:27:44 -08:00
Ben Alpert 261a0af9bb [react-native] Fix Chrome debugging
Summary:
Requiring ExceptionsManager in renderApplication (added in D2023119) led to a transitive require of ExecutionEnvironment, which has to run after InitializeJavaScriptAppEngine.

InitializeJavaScriptAppEngine is the right place for this sort of logic because we control the order that things are loaded, so move the console.error hook initialization there.

@public

Test Plan: Loaded shell app in simulator with Chrome debugging with no errors.
2015-04-30 02:16:40 -08:00
Spencer Ahrens ecf7baebea [React Native] Actually bring back console.error redboxes with disable flag 2015-04-28 14:53:36 -08:00
Ben Alpert dd56ccb9c7 [react-native] Fix capitalization of "REact" 2015-04-27 13:52:57 -08:00
Eric Vicenti 3f723f451d [ReactNative][RFC] Yellow Box for warnings 2015-04-27 13:32:22 -08:00
Nick Lockwood 77e38b26c5 Improved RCTActivityIndicatorView and fixed some flow errors 2015-04-26 02:17:13 -08:00
Bill Fisher 357a54500e Implement transform styles, redux 2015-04-23 10:17:39 -08:00
Nick Lockwood 462224727a Reduced prop mapping overhead 2015-04-22 04:13:25 -08:00
Spencer Ahrens 58a550fa06 [ReactNative] use requireNativeComponent to clean up a bunch of boilerplate 2015-04-21 21:06:48 -08:00
Andy Street 2186691812 Revert "[ReactNative] implement transform styles" 2015-04-18 11:54:08 -08:00
Bill Fisher bd5b12c535 [ReactNative] implement transform styles 2015-04-17 22:30:21 -08:00
Spencer Ahrens 915151c5d7 [ReactNative] verifyPropTypes against native exports 2015-04-16 18:15:36 -08:00
Spencer Ahrens 764854c04a [ReactNative] introduce requireNativeComponent 2015-04-16 17:12:12 -08:00
Spencer Ahrens 54889dacf3 [ReactNative] Remove experimental Portal only needed for android right now. 2015-04-04 13:16:31 -08:00
Ben Alpert 03cf69dde1 [react-native] Nicer error for undefined or string tag names 2015-04-02 16:40:24 -08:00
Ben Alpert b2fc956858 [react-native] Fix documentation extraction for View 2015-03-31 16:20:14 -08:00
Ben Alpert d75bd44e27 [react-native] Bring React.render behavior in line with web 2015-03-31 10:52:42 -08:00
Ben Alpert 19969149ad [react-native] Support returning null from a component 2015-03-31 01:33:44 -08:00
Martin Konicek bf4bd4b08e [ReactNative] JS files for D1947217 2015-03-27 13:48:41 -08:00
Marshall Roch 7ffa7942aa flowify Libraries/ReactIOS 2015-03-25 17:09:51 -08:00
Marshall Roch 0315719507 Flowify ReactIOSEventEmitter 2015-03-25 10:10:47 -08:00
Marshall Roch 9eec8aa9d5 Flowify a bunch of Libraries 2015-03-24 18:22:05 -08:00
Marshall Roch 9a12b9c728 Flowify renderApplication 2015-03-24 11:16:19 -08:00
Christopher Chedeau e1ef0328d9 [ReactNative] Expanded license on js files 2015-03-23 13:17:54 -08:00
Alex Kotliarskyi 0cdf56cc4f [ReactNative] Fix React Devtools integration 2015-03-23 12:58:55 -08:00
Spencer Ahrens 9086365faf [ReactNative] Strip prefixes from NativeModules keys 2015-03-17 21:54:27 -08:00
Eric Vicenti 2aafcd0e58 [ReactNative] Remove pushNotification prop from renderApplication 2015-03-17 11:48:06 -08:00
Spencer Ahrens d8ee4e87a1 [ReactKit] Remove NativeModulesDeprecated 2015-03-17 02:48:58 -08:00
Spencer Ahrens b396de3cc8 [ReactNative] s/RK/RCT in OSS 2015-03-17 02:48:57 -08:00
Andrew Rasmussen 5f538b2284 [ReactNative] Put launchOptions in RCTPushNotificationManager 2015-03-16 12:11:50 -08:00
Eric Vicenti 30d3117f96 [ReactNative|MAdMan] Notification Subscribable 2015-03-11 13:44:30 -08:00
Christoph Pojer 0c4b338bca [Relay] Update Relay + ES6 class containers 2015-03-10 17:39:47 -08:00
Philipp von Weitershausen 1793712c77 [ReactNative][Android] Fix after a new React version was downstreamed 2015-03-10 14:44:05 -08:00
Christopher Chedeau 0f2a2e73f0 [ReactNative] Remove nativePropTypes 2015-03-09 09:49:27 -08:00
Ben Alpert b335f88efd [React Native] Update core modules for React 0.13 2015-03-06 17:12:53 -08:00
James Ide ddf8933904 [Children] Expose React.Children like web React
Summary:
Simply exposes this public API from ReactIOS in the same manner as web React.
Closes https://github.com/facebook/react-native/pull/104
Github Author: James Ide <ide@jameside.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-02-26 20:24:46 -08:00
Spencer Ahrens efae175a8e [react-packager][streamline oss] Move open sourced JS source to react-native-github 2015-02-19 21:25:11 -08:00