mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
a49e06dffa7e928180aaf38dd85fd8dc00e1ea2f
This adds a regression test and fix for a case where a sync update triggers selective hydration, which then leads to a "Maximum update depth exceeded" error, even though there was only a single update. This happens when a single sync update flows into many sibling dehydrated Suspense boundaries. This fix is, if a commit was the result of selective hydration, we should not increment the nested update count, because those renders conceptually are not updates. Ideally, they wouldn't even be in a separate commit — we should be able to hydrate a tree and apply an update on top of it within the same render phase. We could do this once we implement resumable context stacks. DiffTrain build for commit https://github.com/facebook/react/commit/d900fadbf9017063fecb2641b7e99303b82a6f17.
react-fbsource-import
Description
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%