Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(android): fix headless crash with null ReactContext
very tricky to make sure react-native is initialized during headlessJS startup so you don't beat it in the race to asking for a ReactContext before it exists - startup is event-driven so you have to attach listeners - startup has to run on main thread so you have to post runnables - multiple tasks may come in while starting up, you must queue / drain - startup objects / methods differ across react-native new / old arch get all that right, and you'll have a valid ReactContext, without dropping any tasks that needed it before react-native was initialized
- Loading branch information