mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
RN: Simplify Context Creation (Android)
Summary: Every call site is either already using `createReactContextInBackground` correctly or guarding the invocation using `hasStartedCreatingInitialContext`. This is an unnecessary and overly complex dance that can be simplified. This revision simplifies the use of `createReactContextInBackground` by integrating the check. This is not a breaking change. Reviewed By: zackargyle, mdvacca Differential Revision: D15566632 fbshipit-source-id: 7b50285c9ac6776d1297d2c9c53dff208851b722
This commit is contained in:
committed by
Facebook Github Bot
parent
060a3ea3bf
commit
739651afa1
@@ -394,9 +394,7 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
||||
// TODO initialize surface here
|
||||
}
|
||||
|
||||
if (!mReactInstanceManager.hasStartedCreatingInitialContext()) {
|
||||
mReactInstanceManager.createReactContextInBackground();
|
||||
}
|
||||
mReactInstanceManager.createReactContextInBackground();
|
||||
|
||||
attachToReactInstanceManager();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user