-
Notifications
You must be signed in to change notification settings - Fork 24.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attach react instance to react host immediately
Summary: ## Changes 1. Store the react instance inside a private property (vs in the mReactInstanceTaskRef) 2. Attach the react instance to that property immediatley, after create ## Problems resolved 1. React host apis that use the instance (like ReactContext.getNativeModule()) will now also work **during** react native init. (see T191972567). 2. If exceptions get thrown during react instance init, the react instance will now get cleaned up (see test plan). Changelog: [Internal] Reviewed By: javache Differential Revision: D58537535 fbshipit-source-id: fddf44d45b214b52a950e33d67ac6612a50ddcba
- Loading branch information
1 parent
2e2b71e
commit 74d030d
Showing
1 changed file
with
33 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters