Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add flashImmediateRunning flag to setupSetImmediate (software-mansion…
…#4280) <!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please follow the template so that the reviewers can easily understand what the code changes affect. --> ## Summary - fixes software-mansion#4168 The problem is caused by recursive `callMicrotasks` calls. Recursive calls appear when we have an event that trigger another event that calls `callMicrotasks` synchronously. In result, we call the same microtasks array multiple times. In some cases we get the wrong order of instructions and we end up with `runRequested` set on `true` without callbacks in the queue, so we never call `queueMicrotask` again. The idea of fix is to set flag that inform us, that we are inside `callMicrotasks` call, so we don't execute the same callbacks again ## Test plan - Created minimal repro using to `Animated.ScrollView` components. (one trigger another) - Tested on example from issue
- Loading branch information