react-native/Libraries
Kevin Gozali fb7fe2d4e8 modernize AppContainer and add rootTag in the child context
Summary:
This does 2 things:
- modernize the component to use ES6 + flow
- assign `rootTag` to the child context

Each view in RN has its own `reactTag`. The reactTag for a root view is called `rootTag`. When there are multiple react root views active within the app (e.g. in a hybrid environment), rootTag is the only reliable "label" to differentiate them. This is especially useful when we want to limit an event/activity on a particular root view, instead of affecting all active root views. This allows components to do:

```
class Foo extends React.Component {
  static contextTypes = {
    rootTag: React.PropTypes.number,
  };

  componentDidMount() {
    // Get the root tag of this component, which is static for all components under the same root view
    console.log(this.context.rootTag);
  }
}
```

In a pure JS RN app environment, there will always be exactly 1 root view, so `rootTag` may usually be ignored.

Reviewed By: yungsters

Differential Revision: D4130376

fbshipit-source-id: 559b67615f487bad754b5832ad4a02bcef05be2a
2016-11-06 20:58:34 -08:00
..
ART RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
ActionSheetIOS ActionSheetIOS - Pass URL, not file contents to UIActivityViewController for file URLs. 2016-09-06 04:43:36 -07:00
AdSupport Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
Alert fix typo in Alert.js 2016-10-14 08:13:55 -07:00
Animated RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
AppState Remove deprecated APIs and modules 2016-10-11 07:43:52 -07:00
BatchedBridge Reorganize core JS files 2016-10-11 10:14:28 -07:00
BugReporting RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
CameraRoll Update file for Markdown link syntax 2016-10-16 15:28:42 -07:00
Components Add currentHeight constant to status bar docs 2016-11-05 17:13:29 -07:00
Core RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
CustomComponents Fix NavigationCardStackPanResponder to work with native animations 2016-11-04 20:43:43 -07:00
DebugComponentHierarchy Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
EventEmitter Cleanup: Remove `@typechecks` 2016-10-12 19:28:42 -07:00
Experimental fix FlowFixMe in SwipeableQuickActionButton 2016-10-24 09:58:53 -07:00
Geolocation RCTLocationObserver: Fix reporting of timeout error 2016-09-21 14:28:43 -07:00
Image Remove underline colour in Android text inputs 2016-11-04 14:58:46 -07:00
Inspector RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
Interaction RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
JSInspector Add Network agent 2016-11-02 12:29:15 -07:00
LayoutAnimation RN: Stop Deep Linking `ReactPropTypes` 2016-10-14 18:59:10 -07:00
Linking Auto-fix lint errors 2016-08-09 06:43:46 -07:00
LinkingIOS Remove deprecated APIs and modules 2016-10-11 07:43:52 -07:00
Modal update Modal.js to fix #10662 2016-11-04 18:43:42 -07:00
NativeAnimation Add support for native animated events on iOS 2016-11-01 03:58:53 -07:00
NavigationExperimental Reverted commit D4027388 2016-10-16 04:13:42 -07:00
Network Add Network agent 2016-11-02 12:29:15 -07:00
Performance RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
PermissionsAndroid Docs fix: remove confusing typo 2016-09-19 14:46:12 -07:00
PushNotificationIOS added semicolon which broke in #8040 2016-10-27 03:13:43 -07:00
RCTTest Travis CI reliability fixes: preload package manager and increase tim… 2016-10-16 15:43:44 -07:00
ReactNative modernize AppContainer and add rootTag in the child context 2016-11-06 20:58:34 -08:00
Renderer RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
Sample Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
Settings Apple TV support 2: Xcode projects and CI (scripts/objc-test.sh) 2016-10-05 07:28:44 -07:00
Share Add Share module 2016-07-25 03:43:29 -07:00
Storage Auto-fix lint errors 2016-08-09 06:43:46 -07:00
StyleSheet RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
Text RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
Utilities Move Platform constants to RCTPlatform 2016-10-27 04:29:00 -07:00
Vibration Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
WebSocket ios:websocket:exectuor : Grab port from Bundle URL 2016-10-12 08:43:37 -07:00
react-native RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
vendor Cleanup clear/set/throwImmediate 2016-08-12 07:28:38 -07:00
Promise.js Make onUnhandled safe for undefined errors 2016-08-02 07:58:28 -07:00
promiseRejectionIsError.js Add possibility to `console.error`/redbox on promise rejections 2016-03-15 05:22:22 -07:00