Replaced unstable_AsyncComponent with unstable_AsyncMode
Reviewed By: gaearon Differential Revision: D7025510 fbshipit-source-id: 1aff984ce7479e5fdff71259d0f552193a6cdcea
This commit is contained in:
parent
22cf81571b
commit
9dd7608c97
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue