diff --git a/Libraries/Modal/Modal.js b/Libraries/Modal/Modal.js index cc5206841..782ec78a3 100644 --- a/Libraries/Modal/Modal.js +++ b/Libraries/Modal/Modal.js @@ -128,6 +128,10 @@ class Modal extends React.Component { visible: true, }; + static contextTypes = { + rootTag: React.PropTypes.number, + }; + render(): ?React.Element { if (this.props.visible === false) { return null; @@ -147,7 +151,7 @@ class Modal extends React.Component { } const innerChildren = __DEV__ ? - ( + ( {this.props.children} ) : this.props.children; diff --git a/Libraries/ReactNative/AppContainer.js b/Libraries/ReactNative/AppContainer.js index 8b3a76b8c..d7680bd85 100644 --- a/Libraries/ReactNative/AppContainer.js +++ b/Libraries/ReactNative/AppContainer.js @@ -19,13 +19,12 @@ const ReactNative = require('ReactNative'); const StyleSheet = require('StyleSheet'); const View = require('View'); -// TODO (fkg): make rootTag required type Context = { - rootTag: ?number, + rootTag: number, }; type Props = { children?: React.Children, - rootTag?: number, + rootTag: number, }; type State = { inspector: ?React.Element<*>,