Fix: Synchronous popstate transitions
This is a refactor of the fix in #27505.
When a transition update is scheduled by a popstate event, (i.e. a back/ forward navigation) we attempt to render it synchronously even though it's a transition, since it's likely the previous page's data is cached.
In #27505, I changed the implementation so that it only "upgrades" the priority of the transition for a single attempt. If the attempt suspends, say because the data is not cached after all, from then on it should be treated as a normal transition.
But it turns out #27505 did not work as intended, because it relied on marking the root with pending synchronous work (root.pendingLanes), which was never cleared until the popstate update completed.
The test scenarios I wrote accidentally worked for a different reason related to suspending the work loop, which I'm currently in the middle of refactoring.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| react-compiler-playground | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Aug 23, 2024 3:58pm |
Comparing: b57d282369b3b3232d8fed537f5aaf0156430d63...7dd999a5a8852f3c40e9522b00602afae658f6a2
Critical size changes
Includes critical production bundles, as well as any change greater than 2%:
| Name | +/- | Base | Current | +/- gzip | Base gzip | Current gzip |
|---|---|---|---|---|---|---|
| oss-stable/react-dom/cjs/react-dom.production.js | = | 6.68 kB | 6.68 kB | = | 1.83 kB | 1.82 kB |
| oss-stable/react-dom/cjs/react-dom-client.production.js | +0.21% | 500.37 kB | 501.40 kB | +0.21% | 89.80 kB | 89.99 kB |
| oss-experimental/react-dom/cjs/react-dom.production.js | = | 6.69 kB | 6.69 kB | = | 1.83 kB | 1.83 kB |
| oss-experimental/react-dom/cjs/react-dom-client.production.js | +0.20% | 507.50 kB | 508.52 kB | +0.21% | 90.96 kB | 91.16 kB |
| facebook-www/ReactDOM-prod.classic.js | +0.15% | 595.24 kB | 596.16 kB | +0.13% | 105.55 kB | 105.70 kB |
| facebook-www/ReactDOM-prod.modern.js | +0.16% | 571.54 kB | 572.44 kB | +0.13% | 101.75 kB | 101.88 kB |
Significant size changes
Includes any change greater than 0.2%:
Expand to show
Generated by :no_entry_sign: dangerJS against ac17c6900a94fd64206b98a828c6f5a5b97f8606