Replaced unstable_AsyncComponent with unstable_AsyncMode

Reviewed By: gaearon

Differential Revision: D7025510

fbshipit-source-id: 1aff984ce7479e5fdff71259d0f552193a6cdcea
This commit is contained in:
Brian Vaughn 2018-02-20 17:35:29 -08:00 committed by Facebook Github Bot
parent 22cf81571b
commit 9dd7608c97
2 changed files with 4 additions and 18 deletions

View File

@ -42,15 +42,8 @@ function renderApplication<Props: Object>(
RootComponent.prototype.unstable_isAsyncReactComponent === true RootComponent.prototype.unstable_isAsyncReactComponent === true
) { ) {
// $FlowFixMe This is not yet part of the official public API // $FlowFixMe This is not yet part of the official public API
class AppContainerAsyncWrapper extends React.unstable_AsyncComponent { const AsyncMode = React.unstable_AsyncMode;
render() { renderable = <AsyncMode>{renderable}</AsyncMode>;
return this.props.children;
}
}
renderable = (
<AppContainerAsyncWrapper>{renderable}</AppContainerAsyncWrapper>
);
} }
ReactNative.render(renderable, rootTag); ReactNative.render(renderable, rootTag);

View File

@ -43,15 +43,8 @@ function renderFabricSurface<Props: Object>(
RootComponent.prototype.unstable_isAsyncReactComponent === true RootComponent.prototype.unstable_isAsyncReactComponent === true
) { ) {
// $FlowFixMe This is not yet part of the official public API // $FlowFixMe This is not yet part of the official public API
class AppContainerAsyncWrapper extends React.unstable_AsyncComponent { const AsyncMode = React.unstable_AsyncMode;
render() { renderable = <AsyncMode>{renderable}</AsyncMode>;
return this.props.children;
}
}
renderable = (
<AppContainerAsyncWrapper>{renderable}</AppContainerAsyncWrapper>
);
} }
ReactFabric.render(renderable, rootTag); ReactFabric.render(renderable, rootTag);