-
Notifications
You must be signed in to change notification settings - Fork 47.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix suspense fallback throttling #24253
Conversation
Comparing: e0160d5...8bd48ca Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
fd70a75
to
d9a9e7c
Compare
d45bb57
to
9805935
Compare
It would be nice to add some test that passes in this branch but fails on main. |
Nice fix! I can work on adding a test unless you beat me to it |
9805935
to
a2bfae1
Compare
a2bfae1
to
b1062aa
Compare
345b90f
to
d89c871
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Leaving for @acdlite to do a final review & merge
@sunderls Thank you so much for finding this and sending a fix! Really nice work. |
Very impressive PR! Thanks for the fix! |
* fix suspense throttling * fix lint * Tweak tests + another test Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* fix suspense throttling * fix lint * Tweak tests + another test Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* fix suspense throttling * fix lint * Tweak tests + another test Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* fix suspense throttling * fix lint * Tweak tests + another test Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Summary
There seems to be a regression on suspense throttling.
in React 18-alpha version, Suspense fallbacks are throttled in committing codesandbox link
in React 18 release version, this is no longer working codesandbox link
Root cause
see the inline comments
How did you test this change?
Apr-02-2022.00-24-42.mp4
Apr-02-2022.00-25-25.mp4
Test
Added one more test case in
ReactSuspense-test.internal.js
, to mimic the repro in above videoson
main
branch it failsin this patch, it passes