Closed acdlite closed 3 years ago
The code that checks for high priority updates only checks the first hook on the component:
https://github.com/facebook/react/blob/5064c7f6aa2b46469ac601cc851640e91ec340a9/packages/react-reconciler/src/ReactFiberWorkLoop.js#L2889-L2891
workInProgress.memoizedState is the first hook.
workInProgress.memoizedState
It should loop through all the hooks instead:
let firstHook = workInProgress.memoizedState; if (firstHook !== null) { let hook = firstHook; do { // Stuff goes here hook = hook.next; } while (hook !== firstHook) }
The warning is gone.
The code that checks for high priority updates only checks the first hook on the component:
https://github.com/facebook/react/blob/5064c7f6aa2b46469ac601cc851640e91ec340a9/packages/react-reconciler/src/ReactFiberWorkLoop.js#L2889-L2891
workInProgress.memoizedState
is the first hook.It should loop through all the hooks instead: