Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use fewer global variables in Hooks (#17480)
* We don't need the global state for this * Move componentUpdateQueue and sideEffectTag out of global state * Move firstWorkInProgressHook off global state * Move remainingExpirationTime off global state * Reset fiber to its current state if it throws * Move rerender error check to avoid global state This means that it's harder to find it since it's not in the dispatch function's stack but we can add a DEV only one for that if we really need it. Alternatively, we can check it in against the renderUpdates queue. * Move next___Hook out of global state * Assert that currentlyRenderingFiber is always set When accessed, this should always be set. This could enforced by storing this on the dispatcher for example. * Add another test just to be safe
- Loading branch information