You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #20163 added a new (not yet released) phase to the Profiler API: "nested-update". This phase is different from a regular "update" because of the performance implications (see PR description for more background info).
Would be nice if we could also flag these in the DevTools UI somehow.
The text was updated successfully, but these errors were encountered:
useSubscription and useMutableSource both check for changes in a passive effect, to avoid stretching the commit phase. It may seem more intuitive to use a layout effect so that you don't "miss" an update but it wouldn't actually guarantee that in concurrent mode, because you might miss an update during render (e.g. while React has yielded).
One important thing useMutableSource does is ensure that nothing tears within the render – so even if you "miss" an update between render and commit, it will catch it later (during passive effects phase) and schedule an update for it. No big deal so long as nothing tears during the render (which it has checks to prevent). If something would tear during the render, useMutableSource throws and forces React to restart the render.
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!
PR #20163 added a new (not yet released) phase to the Profiler API:
"nested-update"
. This phase is different from a regular"update"
because of the performance implications (see PR description for more background info).Would be nice if we could also flag these in the DevTools UI somehow.
The text was updated successfully, but these errors were encountered: