Skip to content

Commit cf819bf

Browse files
Brian Vaughnfacebook-github-bot
authored andcommitted
Remove outdated React async component check
Summary: I added this check [a couple of years ago](1b22d49) to mimic how [React used to check for async roots](https://github.com/facebook/react/blob/acabf112454e5545205da013266d8529599a2a82/packages/react-reconciler/src/ReactFiberReconciler.js#L321-L330). This code doesn't make sense anymore since there's neither an async base class or an `unstable_ConcurrentMode` export, so I'm just cleaning it up. Reviewed By: threepointone, sebmarkbage Differential Revision: D16668567 fbshipit-source-id: 5ccf5feccc4b65ffb3aeb0a09891d8be7490df26
1 parent deaaab9 commit cf819bf

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

Libraries/ReactNative/renderApplication.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function renderApplication<Props: Object>(
3333
) {
3434
invariant(rootTag, 'Expect to have a valid rootTag, instead got ', rootTag);
3535

36-
let renderable = (
36+
const renderable = (
3737
<PerformanceLoggerContext.Provider
3838
value={scopedPerformanceLogger ?? GlobalPerformanceLogger}>
3939
<AppContainer rootTag={rootTag} WrapperComponent={WrapperComponent}>
@@ -45,21 +45,6 @@ function renderApplication<Props: Object>(
4545
</PerformanceLoggerContext.Provider>
4646
);
4747

48-
// If the root component is async, the user probably wants the initial render
49-
// to be async also. To do this, wrap AppContainer with an async marker.
50-
// For more info see https://fb.me/is-component-async
51-
if (
52-
/* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an
53-
* error found when Flow v0.68 was deployed. To see the error delete this
54-
* comment and run Flow. */
55-
RootComponent.prototype != null &&
56-
RootComponent.prototype.unstable_isAsyncReactComponent === true
57-
) {
58-
// $FlowFixMe This is not yet part of the official public API
59-
const ConcurrentMode = React.unstable_ConcurrentMode;
60-
renderable = <ConcurrentMode>{renderable}</ConcurrentMode>;
61-
}
62-
6348
GlobalPerformanceLogger.startTimespan('renderApplication_React_render');
6449
if (fabric) {
6550
require('../Renderer/shims/ReactFabric').render(renderable, rootTag);

0 commit comments

Comments
 (0)