Fixing typo in AppContainer

Summary: Fixed a typo. Adding an optional wrapper component to AppContainer.

Reviewed By: fkgozali

Differential Revision: D5330056

fbshipit-source-id: 8e33fcbfb21168c641abbd54b79d272a7c361889
This commit is contained in:
Summer Kitahara 2017-06-27 18:08:05 -07:00 committed by Facebook Github Bot
parent afa47924d6
commit 937568b472
2 changed files with 3 additions and 3 deletions

View File

@ -24,11 +24,11 @@ const View = require('View');
type Context = { type Context = {
rootTag: number, rootTag: number,
}; };
type Props = { type Props = {|
children?: React.Children, children?: React.Children,
rootTag: number, rootTag: number,
WrapperComponent?: ?ReactClass<*>, WrapperComponent?: ?ReactClass<*>,
}; |};
type State = { type State = {
inspector: ?React.Element<*>, inspector: ?React.Element<*>,
mainKey: number, mainKey: number,

View File

@ -31,7 +31,7 @@ function renderApplication<Props: Object>(
invariant(rootTag, 'Expect to have a valid rootTag, instead got ', rootTag); invariant(rootTag, 'Expect to have a valid rootTag, instead got ', rootTag);
ReactNative.render( ReactNative.render(
<AppContainer rootTag={rootTag} wrapperComponent={WrapperComponent}> <AppContainer rootTag={rootTag} WrapperComponent={WrapperComponent}>
<RootComponent {...initialProps} rootTag={rootTag} /> <RootComponent {...initialProps} rootTag={rootTag} />
</AppContainer>, </AppContainer>,
rootTag, rootTag,