-
Notifications
You must be signed in to change notification settings - Fork 47.6k
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
Add moveBefore Experiment #31596
Add moveBefore Experiment #31596
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Comparing: e697386...39acaa7 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) |
3e62455
to
48ff9b8
Compare
A long standing issue for React has been that if you reorder stateful nodes, they may lose their state and reload. The thing moving loses its state. There's no way to solve this in general where two stateful nodes swap. The [`moveBefore()` proposal](https://chromestatus.com/feature/5135990159835136?gate=5177450351558656) has now moved to [intent-to-ship](https://groups.google.com/a/chromium.org/g/blink-dev/c/YE_xLH6MkRs/m/_7CD0NYMAAAJ). This function is kind of like `insertBefore` but preserves state. There's [a demo here](https://state-preserving-atomic-move.glitch.me/). Ideally we'd port this demo to a fixture so we can try it. Currently this flag is always off - even in experimental. That's because this is still behind a Chrome flag so it's a little early to turn it on even in experimental. So you need a custom build. It's on in RN but only because it doesn't apply there which makes it easier to tell that it's safe to ship once it's on everywhere else. The other reason it's still off is because there's currently a semantic breaking change. `moveBefore()` errors if both nodes are disconnected. That happens if we're inside a completely disconnected React root. That's not usually how you should use React because it means effects can't read layout etc. However, it is currently supported. To handle this we'd have to try/catch the `moveBefore` to handle this case but we hope this semantic will change before it ships. Before we turn this on in experimental we either have to wait for the implementation to not error in the disconnected-disconnected case in Chrome or we'd have to add try/catch. DiffTrain build for [aba370f](aba370f)
A long standing issue for React has been that if you reorder stateful nodes, they may lose their state and reload. The thing moving loses its state. There's no way to solve this in general where two stateful nodes swap. The [`moveBefore()` proposal](https://chromestatus.com/feature/5135990159835136?gate=5177450351558656) has now moved to [intent-to-ship](https://groups.google.com/a/chromium.org/g/blink-dev/c/YE_xLH6MkRs/m/_7CD0NYMAAAJ). This function is kind of like `insertBefore` but preserves state. There's [a demo here](https://state-preserving-atomic-move.glitch.me/). Ideally we'd port this demo to a fixture so we can try it. Currently this flag is always off - even in experimental. That's because this is still behind a Chrome flag so it's a little early to turn it on even in experimental. So you need a custom build. It's on in RN but only because it doesn't apply there which makes it easier to tell that it's safe to ship once it's on everywhere else. The other reason it's still off is because there's currently a semantic breaking change. `moveBefore()` errors if both nodes are disconnected. That happens if we're inside a completely disconnected React root. That's not usually how you should use React because it means effects can't read layout etc. However, it is currently supported. To handle this we'd have to try/catch the `moveBefore` to handle this case but we hope this semantic will change before it ships. Before we turn this on in experimental we either have to wait for the implementation to not error in the disconnected-disconnected case in Chrome or we'd have to add try/catch. DiffTrain build for [aba370f](facebook@aba370f)
Apparently that does not throw
|
Summary: X-link: facebook/metro#1400 - **[372ec00c03](facebook/react@372ec00c03 )**: Update ReactDebugInfo types to declare timing info separately ([facebook#31714](facebook/react#31714)) //<Sebastian Markbåge>// - **[3d2ab01a55](facebook/react@3d2ab01a55 )**: [Flight] Extract special cases for Server Component return value position ([facebook#31713](facebook/react#31713)) //<Sebastian Markbåge>// - **[1c9b138714](facebook/react@1c9b138714 )**: Don't serialize chunk ids for Hint and Console rows ([facebook#31671](facebook/react#31671)) //<Sebastian Markbåge>// - **[de68d2f4a2](facebook/react@de68d2f4a2 )**: Register Suspense retry handlers in commit phase ([facebook#31667](facebook/react#31667)) //<Josh Story>// - **[16d2bbbd1f](facebook/react@16d2bbbd1f )**: Client render dehydrated Suspense boundaries on document load ([facebook#31620](facebook/react#31620)) //<Josh Story>// - **[5b0ef217ef](facebook/react@5b0ef217ef )**: s/server action/server function ([facebook#31005](facebook/react#31005)) //<Ricky>// - **[e3b7ef32be](facebook/react@e3b7ef32be )**: [crud] Only export uRC when flag is enabled ([facebook#31617](facebook/react#31617)) //<lauren>// - **[aba370f1e4](facebook/react@aba370f1e4 )**: Add moveBefore Experiment ([facebook#31596](facebook/react#31596)) //<Sebastian Markbåge>// - **[1345c37941](facebook/react@1345c37941 )**: Mark all lanes in order on every new render ([facebook#31615](facebook/react#31615)) //<Sebastian Markbåge>// - **[91061073d5](facebook/react@91061073d5 )**: Mark ping time as update ([facebook#31611](facebook/react#31611)) //<Sebastian Markbåge>// - **[a9f14cb44e](facebook/react@a9f14cb44e )**: Fix Logging of Immediately Resolved Promises ([facebook#31610](facebook/react#31610)) //<Sebastian Markbåge>// - **[c11c9510fa](facebook/react@c11c9510fa )**: [crud] Fix deps comparison bug ([facebook#31599](facebook/react#31599)) //<lauren>// - **[64f89510af](facebook/react@64f89510af )**: [crud] Enable on RTR FB builds ([facebook#31590](facebook/react#31590)) //<lauren>// - **[7558ffe84d](facebook/react@7558ffe84d )**: [crud] Fix copy paste typo ([facebook#31588](facebook/react#31588)) //<lauren>// - **[7c254b6576](facebook/react@7c254b6576 )**: Log yielded time in the Component Track ([facebook#31563](facebook/react#31563)) //<Sebastian Markbåge>// - **[6177b18c66](facebook/react@6177b18c66 )**: Track suspended time when the render doesn't commit because it suspended ([facebook#31552](facebook/react#31552)) //<Sebastian Markbåge>// - **[eaf2d5c670](facebook/react@eaf2d5c670 )**: fix[eslint-plugin-react-hooks]: Fix error when callback argument is an identifier with an `as` expression ([facebook#31119](facebook/react#31119)) //<Mark Skelton>// - **[047d95e85f](facebook/react@047d95e85f )**: [crud] Basic implementation ([facebook#31523](facebook/react#31523)) //<lauren>// - **[92c0f5f85f](facebook/react@92c0f5f85f )**: Track separate SuspendedOnAction flag by rethrowing a separate SuspenseActionException sentinel ([facebook#31554](facebook/react#31554)) //<Sebastian Markbåge>// - **[053b3cb050](facebook/react@053b3cb050 )**: [crud] Rename Effect type ([facebook#31557](facebook/react#31557)) //<lauren>// - **[7dd6b9e68a](facebook/react@7dd6b9e68a )**: [crud] Add enableUseResourceEffectHook flag ([facebook#31556](facebook/react#31556)) //<lauren>// - **[d8afd1c82e](facebook/react@d8afd1c82e )**: [crud] Scaffold initial types ([facebook#31555](facebook/react#31555)) //<lauren>// - **[3720870a97](facebook/react@3720870a97 )**: Log Render Phases that Never Committed ([facebook#31548](facebook/react#31548)) //<Sebastian Markbåge>// - **[8a41d6ceab](facebook/react@8a41d6ceab )**: Unify RootDidNotComplete and RootSuspendedWithDelay exit path ([facebook#31547](facebook/react#31547)) //<Sebastian Markbåge>// - **[63cde684f5](facebook/react@63cde684f5 )**: (chore): copy fix in <style> precedence error ([facebook#31524](facebook/react#31524)) //<Zack Tanner>// - **[b01722d585](facebook/react@b01722d585 )**: Format event with "warning" yellow and prefix with "Event: " ([facebook#31536](facebook/react#31536)) //<Sebastian Markbåge>// - **[c13986da78](facebook/react@c13986da78 )**: Fix Overlapping "message" Bug in Performance Track ([facebook#31528](facebook/react#31528)) //<Sebastian Markbåge>// - **[4686872159](facebook/react@4686872159 )**: Log passive commit phase when it wasn't delayed ([facebook#31526](facebook/react#31526)) //<Sebastian Markbåge>// - **[5d89471ca6](facebook/react@5d89471ca6 )**: Export __COMPILER_RUNTIME in stable ([facebook#31540](facebook/react#31540)) //<lauren>// - **[3644f0bd21](facebook/react@3644f0bd21 )**: Use completedRenderEndTime as the start of the commit phase if it's an immediate commit ([facebook#31527](facebook/react#31527)) //<Sebastian Markbåge>// - **[8657869999](facebook/react@8657869999 )**: Separate Tracks for Components and Phases ([facebook#31525](facebook/react#31525)) //<Sebastian Markbåge>// - **[b15135b9f5](facebook/react@b15135b9f5 )**: [ez] Update useMemoCache return type ([facebook#31539](facebook/react#31539)) //<lauren>// Changelog: [General][Changed] - Bump React from 18.3.1 to 19.0.0 jest_e2e[run_all_tests] Reviewed By: cortinico Differential Revision: D67018480
Summary: X-link: facebook/metro#1400 - **[372ec00c03](facebook/react@372ec00c03 )**: Update ReactDebugInfo types to declare timing info separately ([facebook#31714](facebook/react#31714)) //<Sebastian Markbåge>// - **[3d2ab01a55](facebook/react@3d2ab01a55 )**: [Flight] Extract special cases for Server Component return value position ([facebook#31713](facebook/react#31713)) //<Sebastian Markbåge>// - **[1c9b138714](facebook/react@1c9b138714 )**: Don't serialize chunk ids for Hint and Console rows ([facebook#31671](facebook/react#31671)) //<Sebastian Markbåge>// - **[de68d2f4a2](facebook/react@de68d2f4a2 )**: Register Suspense retry handlers in commit phase ([facebook#31667](facebook/react#31667)) //<Josh Story>// - **[16d2bbbd1f](facebook/react@16d2bbbd1f )**: Client render dehydrated Suspense boundaries on document load ([facebook#31620](facebook/react#31620)) //<Josh Story>// - **[5b0ef217ef](facebook/react@5b0ef217ef )**: s/server action/server function ([facebook#31005](facebook/react#31005)) //<Ricky>// - **[e3b7ef32be](facebook/react@e3b7ef32be )**: [crud] Only export uRC when flag is enabled ([facebook#31617](facebook/react#31617)) //<lauren>// - **[aba370f1e4](facebook/react@aba370f1e4 )**: Add moveBefore Experiment ([facebook#31596](facebook/react#31596)) //<Sebastian Markbåge>// - **[1345c37941](facebook/react@1345c37941 )**: Mark all lanes in order on every new render ([facebook#31615](facebook/react#31615)) //<Sebastian Markbåge>// - **[91061073d5](facebook/react@91061073d5 )**: Mark ping time as update ([facebook#31611](facebook/react#31611)) //<Sebastian Markbåge>// - **[a9f14cb44e](facebook/react@a9f14cb44e )**: Fix Logging of Immediately Resolved Promises ([facebook#31610](facebook/react#31610)) //<Sebastian Markbåge>// - **[c11c9510fa](facebook/react@c11c9510fa )**: [crud] Fix deps comparison bug ([facebook#31599](facebook/react#31599)) //<lauren>// - **[64f89510af](facebook/react@64f89510af )**: [crud] Enable on RTR FB builds ([facebook#31590](facebook/react#31590)) //<lauren>// - **[7558ffe84d](facebook/react@7558ffe84d )**: [crud] Fix copy paste typo ([facebook#31588](facebook/react#31588)) //<lauren>// - **[7c254b6576](facebook/react@7c254b6576 )**: Log yielded time in the Component Track ([facebook#31563](facebook/react#31563)) //<Sebastian Markbåge>// - **[6177b18c66](facebook/react@6177b18c66 )**: Track suspended time when the render doesn't commit because it suspended ([facebook#31552](facebook/react#31552)) //<Sebastian Markbåge>// - **[eaf2d5c670](facebook/react@eaf2d5c670 )**: fix[eslint-plugin-react-hooks]: Fix error when callback argument is an identifier with an `as` expression ([facebook#31119](facebook/react#31119)) //<Mark Skelton>// - **[047d95e85f](facebook/react@047d95e85f )**: [crud] Basic implementation ([facebook#31523](facebook/react#31523)) //<lauren>// - **[92c0f5f85f](facebook/react@92c0f5f85f )**: Track separate SuspendedOnAction flag by rethrowing a separate SuspenseActionException sentinel ([facebook#31554](facebook/react#31554)) //<Sebastian Markbåge>// - **[053b3cb050](facebook/react@053b3cb050 )**: [crud] Rename Effect type ([facebook#31557](facebook/react#31557)) //<lauren>// - **[7dd6b9e68a](facebook/react@7dd6b9e68a )**: [crud] Add enableUseResourceEffectHook flag ([facebook#31556](facebook/react#31556)) //<lauren>// - **[d8afd1c82e](facebook/react@d8afd1c82e )**: [crud] Scaffold initial types ([facebook#31555](facebook/react#31555)) //<lauren>// - **[3720870a97](facebook/react@3720870a97 )**: Log Render Phases that Never Committed ([facebook#31548](facebook/react#31548)) //<Sebastian Markbåge>// - **[8a41d6ceab](facebook/react@8a41d6ceab )**: Unify RootDidNotComplete and RootSuspendedWithDelay exit path ([facebook#31547](facebook/react#31547)) //<Sebastian Markbåge>// - **[63cde684f5](facebook/react@63cde684f5 )**: (chore): copy fix in <style> precedence error ([facebook#31524](facebook/react#31524)) //<Zack Tanner>// - **[b01722d585](facebook/react@b01722d585 )**: Format event with "warning" yellow and prefix with "Event: " ([facebook#31536](facebook/react#31536)) //<Sebastian Markbåge>// - **[c13986da78](facebook/react@c13986da78 )**: Fix Overlapping "message" Bug in Performance Track ([facebook#31528](facebook/react#31528)) //<Sebastian Markbåge>// - **[4686872159](facebook/react@4686872159 )**: Log passive commit phase when it wasn't delayed ([facebook#31526](facebook/react#31526)) //<Sebastian Markbåge>// - **[5d89471ca6](facebook/react@5d89471ca6 )**: Export __COMPILER_RUNTIME in stable ([facebook#31540](facebook/react#31540)) //<lauren>// - **[3644f0bd21](facebook/react@3644f0bd21 )**: Use completedRenderEndTime as the start of the commit phase if it's an immediate commit ([facebook#31527](facebook/react#31527)) //<Sebastian Markbåge>// - **[8657869999](facebook/react@8657869999 )**: Separate Tracks for Components and Phases ([facebook#31525](facebook/react#31525)) //<Sebastian Markbåge>// - **[b15135b9f5](facebook/react@b15135b9f5 )**: [ez] Update useMemoCache return type ([facebook#31539](facebook/react#31539)) //<lauren>// Changelog: [General][Changed] - Bump React from 18.3.1 to 19.0.0 jest_e2e[run_all_tests] Reviewed By: cortinico Differential Revision: D67018480
Summary: X-link: facebook/metro#1400 - **[372ec00c03](facebook/react@372ec00c03 )**: Update ReactDebugInfo types to declare timing info separately ([facebook#31714](facebook/react#31714)) //<Sebastian Markbåge>// - **[3d2ab01a55](facebook/react@3d2ab01a55 )**: [Flight] Extract special cases for Server Component return value position ([facebook#31713](facebook/react#31713)) //<Sebastian Markbåge>// - **[1c9b138714](facebook/react@1c9b138714 )**: Don't serialize chunk ids for Hint and Console rows ([facebook#31671](facebook/react#31671)) //<Sebastian Markbåge>// - **[de68d2f4a2](facebook/react@de68d2f4a2 )**: Register Suspense retry handlers in commit phase ([facebook#31667](facebook/react#31667)) //<Josh Story>// - **[16d2bbbd1f](facebook/react@16d2bbbd1f )**: Client render dehydrated Suspense boundaries on document load ([facebook#31620](facebook/react#31620)) //<Josh Story>// - **[5b0ef217ef](facebook/react@5b0ef217ef )**: s/server action/server function ([facebook#31005](facebook/react#31005)) //<Ricky>// - **[e3b7ef32be](facebook/react@e3b7ef32be )**: [crud] Only export uRC when flag is enabled ([facebook#31617](facebook/react#31617)) //<lauren>// - **[aba370f1e4](facebook/react@aba370f1e4 )**: Add moveBefore Experiment ([facebook#31596](facebook/react#31596)) //<Sebastian Markbåge>// - **[1345c37941](facebook/react@1345c37941 )**: Mark all lanes in order on every new render ([facebook#31615](facebook/react#31615)) //<Sebastian Markbåge>// - **[91061073d5](facebook/react@91061073d5 )**: Mark ping time as update ([facebook#31611](facebook/react#31611)) //<Sebastian Markbåge>// - **[a9f14cb44e](facebook/react@a9f14cb44e )**: Fix Logging of Immediately Resolved Promises ([facebook#31610](facebook/react#31610)) //<Sebastian Markbåge>// - **[c11c9510fa](facebook/react@c11c9510fa )**: [crud] Fix deps comparison bug ([facebook#31599](facebook/react#31599)) //<lauren>// - **[64f89510af](facebook/react@64f89510af )**: [crud] Enable on RTR FB builds ([facebook#31590](facebook/react#31590)) //<lauren>// - **[7558ffe84d](facebook/react@7558ffe84d )**: [crud] Fix copy paste typo ([facebook#31588](facebook/react#31588)) //<lauren>// - **[7c254b6576](facebook/react@7c254b6576 )**: Log yielded time in the Component Track ([facebook#31563](facebook/react#31563)) //<Sebastian Markbåge>// - **[6177b18c66](facebook/react@6177b18c66 )**: Track suspended time when the render doesn't commit because it suspended ([facebook#31552](facebook/react#31552)) //<Sebastian Markbåge>// - **[eaf2d5c670](facebook/react@eaf2d5c670 )**: fix[eslint-plugin-react-hooks]: Fix error when callback argument is an identifier with an `as` expression ([facebook#31119](facebook/react#31119)) //<Mark Skelton>// - **[047d95e85f](facebook/react@047d95e85f )**: [crud] Basic implementation ([facebook#31523](facebook/react#31523)) //<lauren>// - **[92c0f5f85f](facebook/react@92c0f5f85f )**: Track separate SuspendedOnAction flag by rethrowing a separate SuspenseActionException sentinel ([facebook#31554](facebook/react#31554)) //<Sebastian Markbåge>// - **[053b3cb050](facebook/react@053b3cb050 )**: [crud] Rename Effect type ([facebook#31557](facebook/react#31557)) //<lauren>// - **[7dd6b9e68a](facebook/react@7dd6b9e68a )**: [crud] Add enableUseResourceEffectHook flag ([facebook#31556](facebook/react#31556)) //<lauren>// - **[d8afd1c82e](facebook/react@d8afd1c82e )**: [crud] Scaffold initial types ([facebook#31555](facebook/react#31555)) //<lauren>// - **[3720870a97](facebook/react@3720870a97 )**: Log Render Phases that Never Committed ([facebook#31548](facebook/react#31548)) //<Sebastian Markbåge>// - **[8a41d6ceab](facebook/react@8a41d6ceab )**: Unify RootDidNotComplete and RootSuspendedWithDelay exit path ([facebook#31547](facebook/react#31547)) //<Sebastian Markbåge>// - **[63cde684f5](facebook/react@63cde684f5 )**: (chore): copy fix in <style> precedence error ([facebook#31524](facebook/react#31524)) //<Zack Tanner>// - **[b01722d585](facebook/react@b01722d585 )**: Format event with "warning" yellow and prefix with "Event: " ([facebook#31536](facebook/react#31536)) //<Sebastian Markbåge>// - **[c13986da78](facebook/react@c13986da78 )**: Fix Overlapping "message" Bug in Performance Track ([facebook#31528](facebook/react#31528)) //<Sebastian Markbåge>// - **[4686872159](facebook/react@4686872159 )**: Log passive commit phase when it wasn't delayed ([facebook#31526](facebook/react#31526)) //<Sebastian Markbåge>// - **[5d89471ca6](facebook/react@5d89471ca6 )**: Export __COMPILER_RUNTIME in stable ([facebook#31540](facebook/react#31540)) //<lauren>// - **[3644f0bd21](facebook/react@3644f0bd21 )**: Use completedRenderEndTime as the start of the commit phase if it's an immediate commit ([facebook#31527](facebook/react#31527)) //<Sebastian Markbåge>// - **[8657869999](facebook/react@8657869999 )**: Separate Tracks for Components and Phases ([facebook#31525](facebook/react#31525)) //<Sebastian Markbåge>// - **[b15135b9f5](facebook/react@b15135b9f5 )**: [ez] Update useMemoCache return type ([facebook#31539](facebook/react#31539)) //<lauren>// Changelog: [General][Changed] - Bump React from 18.3.1 to 19.0.0 jest_e2e[run_all_tests] Reviewed By: cortinico Differential Revision: D67018480
Summary: X-link: facebook/metro#1400 - **[372ec00c03](facebook/react@372ec00c03 )**: Update ReactDebugInfo types to declare timing info separately ([facebook#31714](facebook/react#31714)) //<Sebastian Markbåge>// - **[3d2ab01a55](facebook/react@3d2ab01a55 )**: [Flight] Extract special cases for Server Component return value position ([facebook#31713](facebook/react#31713)) //<Sebastian Markbåge>// - **[1c9b138714](facebook/react@1c9b138714 )**: Don't serialize chunk ids for Hint and Console rows ([facebook#31671](facebook/react#31671)) //<Sebastian Markbåge>// - **[de68d2f4a2](facebook/react@de68d2f4a2 )**: Register Suspense retry handlers in commit phase ([facebook#31667](facebook/react#31667)) //<Josh Story>// - **[16d2bbbd1f](facebook/react@16d2bbbd1f )**: Client render dehydrated Suspense boundaries on document load ([facebook#31620](facebook/react#31620)) //<Josh Story>// - **[5b0ef217ef](facebook/react@5b0ef217ef )**: s/server action/server function ([facebook#31005](facebook/react#31005)) //<Ricky>// - **[e3b7ef32be](facebook/react@e3b7ef32be )**: [crud] Only export uRC when flag is enabled ([facebook#31617](facebook/react#31617)) //<lauren>// - **[aba370f1e4](facebook/react@aba370f1e4 )**: Add moveBefore Experiment ([facebook#31596](facebook/react#31596)) //<Sebastian Markbåge>// - **[1345c37941](facebook/react@1345c37941 )**: Mark all lanes in order on every new render ([facebook#31615](facebook/react#31615)) //<Sebastian Markbåge>// - **[91061073d5](facebook/react@91061073d5 )**: Mark ping time as update ([facebook#31611](facebook/react#31611)) //<Sebastian Markbåge>// - **[a9f14cb44e](facebook/react@a9f14cb44e )**: Fix Logging of Immediately Resolved Promises ([facebook#31610](facebook/react#31610)) //<Sebastian Markbåge>// - **[c11c9510fa](facebook/react@c11c9510fa )**: [crud] Fix deps comparison bug ([facebook#31599](facebook/react#31599)) //<lauren>// - **[64f89510af](facebook/react@64f89510af )**: [crud] Enable on RTR FB builds ([facebook#31590](facebook/react#31590)) //<lauren>// - **[7558ffe84d](facebook/react@7558ffe84d )**: [crud] Fix copy paste typo ([facebook#31588](facebook/react#31588)) //<lauren>// - **[7c254b6576](facebook/react@7c254b6576 )**: Log yielded time in the Component Track ([facebook#31563](facebook/react#31563)) //<Sebastian Markbåge>// - **[6177b18c66](facebook/react@6177b18c66 )**: Track suspended time when the render doesn't commit because it suspended ([facebook#31552](facebook/react#31552)) //<Sebastian Markbåge>// - **[eaf2d5c670](facebook/react@eaf2d5c670 )**: fix[eslint-plugin-react-hooks]: Fix error when callback argument is an identifier with an `as` expression ([facebook#31119](facebook/react#31119)) //<Mark Skelton>// - **[047d95e85f](facebook/react@047d95e85f )**: [crud] Basic implementation ([facebook#31523](facebook/react#31523)) //<lauren>// - **[92c0f5f85f](facebook/react@92c0f5f85f )**: Track separate SuspendedOnAction flag by rethrowing a separate SuspenseActionException sentinel ([facebook#31554](facebook/react#31554)) //<Sebastian Markbåge>// - **[053b3cb050](facebook/react@053b3cb050 )**: [crud] Rename Effect type ([facebook#31557](facebook/react#31557)) //<lauren>// - **[7dd6b9e68a](facebook/react@7dd6b9e68a )**: [crud] Add enableUseResourceEffectHook flag ([facebook#31556](facebook/react#31556)) //<lauren>// - **[d8afd1c82e](facebook/react@d8afd1c82e )**: [crud] Scaffold initial types ([facebook#31555](facebook/react#31555)) //<lauren>// - **[3720870a97](facebook/react@3720870a97 )**: Log Render Phases that Never Committed ([facebook#31548](facebook/react#31548)) //<Sebastian Markbåge>// - **[8a41d6ceab](facebook/react@8a41d6ceab )**: Unify RootDidNotComplete and RootSuspendedWithDelay exit path ([facebook#31547](facebook/react#31547)) //<Sebastian Markbåge>// - **[63cde684f5](facebook/react@63cde684f5 )**: (chore): copy fix in <style> precedence error ([facebook#31524](facebook/react#31524)) //<Zack Tanner>// - **[b01722d585](facebook/react@b01722d585 )**: Format event with "warning" yellow and prefix with "Event: " ([facebook#31536](facebook/react#31536)) //<Sebastian Markbåge>// - **[c13986da78](facebook/react@c13986da78 )**: Fix Overlapping "message" Bug in Performance Track ([facebook#31528](facebook/react#31528)) //<Sebastian Markbåge>// - **[4686872159](facebook/react@4686872159 )**: Log passive commit phase when it wasn't delayed ([facebook#31526](facebook/react#31526)) //<Sebastian Markbåge>// - **[5d89471ca6](facebook/react@5d89471ca6 )**: Export __COMPILER_RUNTIME in stable ([facebook#31540](facebook/react#31540)) //<lauren>// - **[3644f0bd21](facebook/react@3644f0bd21 )**: Use completedRenderEndTime as the start of the commit phase if it's an immediate commit ([facebook#31527](facebook/react#31527)) //<Sebastian Markbåge>// - **[8657869999](facebook/react@8657869999 )**: Separate Tracks for Components and Phases ([facebook#31525](facebook/react#31525)) //<Sebastian Markbåge>// - **[b15135b9f5](facebook/react@b15135b9f5 )**: [ez] Update useMemoCache return type ([facebook#31539](facebook/react#31539)) //<lauren>// Changelog: [General][Changed] - Bump React from 18.3.1 to 19.0.0 jest_e2e[run_all_tests] Reviewed By: cortinico Differential Revision: D67018480
Summary: X-link: facebook/react-native#48196 - **[372ec00c03](facebook/react@372ec00c03 )**: Update ReactDebugInfo types to declare timing info separately ([#31714](facebook/react#31714)) //<Sebastian Markbåge>// - **[3d2ab01a55](facebook/react@3d2ab01a55 )**: [Flight] Extract special cases for Server Component return value position ([#31713](facebook/react#31713)) //<Sebastian Markbåge>// - **[1c9b138714](facebook/react@1c9b138714 )**: Don't serialize chunk ids for Hint and Console rows ([#31671](facebook/react#31671)) //<Sebastian Markbåge>// - **[de68d2f4a2](facebook/react@de68d2f4a2 )**: Register Suspense retry handlers in commit phase ([#31667](facebook/react#31667)) //<Josh Story>// - **[16d2bbbd1f](facebook/react@16d2bbbd1f )**: Client render dehydrated Suspense boundaries on document load ([#31620](facebook/react#31620)) //<Josh Story>// - **[5b0ef217ef](facebook/react@5b0ef217ef )**: s/server action/server function ([#31005](facebook/react#31005)) //<Ricky>// - **[e3b7ef32be](facebook/react@e3b7ef32be )**: [crud] Only export uRC when flag is enabled ([#31617](facebook/react#31617)) //<lauren>// - **[aba370f1e4](facebook/react@aba370f1e4 )**: Add moveBefore Experiment ([#31596](facebook/react#31596)) //<Sebastian Markbåge>// - **[1345c37941](facebook/react@1345c37941 )**: Mark all lanes in order on every new render ([#31615](facebook/react#31615)) //<Sebastian Markbåge>// - **[91061073d5](facebook/react@91061073d5 )**: Mark ping time as update ([#31611](facebook/react#31611)) //<Sebastian Markbåge>// - **[a9f14cb44e](facebook/react@a9f14cb44e )**: Fix Logging of Immediately Resolved Promises ([#31610](facebook/react#31610)) //<Sebastian Markbåge>// - **[c11c9510fa](facebook/react@c11c9510fa )**: [crud] Fix deps comparison bug ([#31599](facebook/react#31599)) //<lauren>// - **[64f89510af](facebook/react@64f89510af )**: [crud] Enable on RTR FB builds ([#31590](facebook/react#31590)) //<lauren>// - **[7558ffe84d](facebook/react@7558ffe84d )**: [crud] Fix copy paste typo ([#31588](facebook/react#31588)) //<lauren>// - **[7c254b6576](facebook/react@7c254b6576 )**: Log yielded time in the Component Track ([#31563](facebook/react#31563)) //<Sebastian Markbåge>// - **[6177b18c66](facebook/react@6177b18c66 )**: Track suspended time when the render doesn't commit because it suspended ([#31552](facebook/react#31552)) //<Sebastian Markbåge>// - **[eaf2d5c670](facebook/react@eaf2d5c670 )**: fix[eslint-plugin-react-hooks]: Fix error when callback argument is an identifier with an `as` expression ([#31119](facebook/react#31119)) //<Mark Skelton>// - **[047d95e85f](facebook/react@047d95e85f )**: [crud] Basic implementation ([#31523](facebook/react#31523)) //<lauren>// - **[92c0f5f85f](facebook/react@92c0f5f85f )**: Track separate SuspendedOnAction flag by rethrowing a separate SuspenseActionException sentinel ([#31554](facebook/react#31554)) //<Sebastian Markbåge>// - **[053b3cb050](facebook/react@053b3cb050 )**: [crud] Rename Effect type ([#31557](facebook/react#31557)) //<lauren>// - **[7dd6b9e68a](facebook/react@7dd6b9e68a )**: [crud] Add enableUseResourceEffectHook flag ([#31556](facebook/react#31556)) //<lauren>// - **[d8afd1c82e](facebook/react@d8afd1c82e )**: [crud] Scaffold initial types ([#31555](facebook/react#31555)) //<lauren>// - **[3720870a97](facebook/react@3720870a97 )**: Log Render Phases that Never Committed ([#31548](facebook/react#31548)) //<Sebastian Markbåge>// - **[8a41d6ceab](facebook/react@8a41d6ceab )**: Unify RootDidNotComplete and RootSuspendedWithDelay exit path ([#31547](facebook/react#31547)) //<Sebastian Markbåge>// - **[63cde684f5](facebook/react@63cde684f5 )**: (chore): copy fix in <style> precedence error ([#31524](facebook/react#31524)) //<Zack Tanner>// - **[b01722d585](facebook/react@b01722d585 )**: Format event with "warning" yellow and prefix with "Event: " ([#31536](facebook/react#31536)) //<Sebastian Markbåge>// - **[c13986da78](facebook/react@c13986da78 )**: Fix Overlapping "message" Bug in Performance Track ([#31528](facebook/react#31528)) //<Sebastian Markbåge>// - **[4686872159](facebook/react@4686872159 )**: Log passive commit phase when it wasn't delayed ([#31526](facebook/react#31526)) //<Sebastian Markbåge>// - **[5d89471ca6](facebook/react@5d89471ca6 )**: Export __COMPILER_RUNTIME in stable ([#31540](facebook/react#31540)) //<lauren>// - **[3644f0bd21](facebook/react@3644f0bd21 )**: Use completedRenderEndTime as the start of the commit phase if it's an immediate commit ([#31527](facebook/react#31527)) //<Sebastian Markbåge>// - **[8657869999](facebook/react@8657869999 )**: Separate Tracks for Components and Phases ([#31525](facebook/react#31525)) //<Sebastian Markbåge>// - **[b15135b9f5](facebook/react@b15135b9f5 )**: [ez] Update useMemoCache return type ([#31539](facebook/react#31539)) //<lauren>// Changelog: [General][Changed] - Bump React from 18.3.1 to 19.0.0 jest_e2e[run_all_tests] Reviewed By: cortinico Differential Revision: D67018480
Summary: X-link: facebook/metro#1400 - **[372ec00c03](facebook/react@372ec00c03 )**: Update ReactDebugInfo types to declare timing info separately ([facebook#31714](facebook/react#31714)) //<Sebastian Markbåge>// - **[3d2ab01a55](facebook/react@3d2ab01a55 )**: [Flight] Extract special cases for Server Component return value position ([facebook#31713](facebook/react#31713)) //<Sebastian Markbåge>// - **[1c9b138714](facebook/react@1c9b138714 )**: Don't serialize chunk ids for Hint and Console rows ([facebook#31671](facebook/react#31671)) //<Sebastian Markbåge>// - **[de68d2f4a2](facebook/react@de68d2f4a2 )**: Register Suspense retry handlers in commit phase ([facebook#31667](facebook/react#31667)) //<Josh Story>// - **[16d2bbbd1f](facebook/react@16d2bbbd1f )**: Client render dehydrated Suspense boundaries on document load ([facebook#31620](facebook/react#31620)) //<Josh Story>// - **[5b0ef217ef](facebook/react@5b0ef217ef )**: s/server action/server function ([facebook#31005](facebook/react#31005)) //<Ricky>// - **[e3b7ef32be](facebook/react@e3b7ef32be )**: [crud] Only export uRC when flag is enabled ([facebook#31617](facebook/react#31617)) //<lauren>// - **[aba370f1e4](facebook/react@aba370f1e4 )**: Add moveBefore Experiment ([facebook#31596](facebook/react#31596)) //<Sebastian Markbåge>// - **[1345c37941](facebook/react@1345c37941 )**: Mark all lanes in order on every new render ([facebook#31615](facebook/react#31615)) //<Sebastian Markbåge>// - **[91061073d5](facebook/react@91061073d5 )**: Mark ping time as update ([facebook#31611](facebook/react#31611)) //<Sebastian Markbåge>// - **[a9f14cb44e](facebook/react@a9f14cb44e )**: Fix Logging of Immediately Resolved Promises ([facebook#31610](facebook/react#31610)) //<Sebastian Markbåge>// - **[c11c9510fa](facebook/react@c11c9510fa )**: [crud] Fix deps comparison bug ([facebook#31599](facebook/react#31599)) //<lauren>// - **[64f89510af](facebook/react@64f89510af )**: [crud] Enable on RTR FB builds ([facebook#31590](facebook/react#31590)) //<lauren>// - **[7558ffe84d](facebook/react@7558ffe84d )**: [crud] Fix copy paste typo ([facebook#31588](facebook/react#31588)) //<lauren>// - **[7c254b6576](facebook/react@7c254b6576 )**: Log yielded time in the Component Track ([facebook#31563](facebook/react#31563)) //<Sebastian Markbåge>// - **[6177b18c66](facebook/react@6177b18c66 )**: Track suspended time when the render doesn't commit because it suspended ([facebook#31552](facebook/react#31552)) //<Sebastian Markbåge>// - **[eaf2d5c670](facebook/react@eaf2d5c670 )**: fix[eslint-plugin-react-hooks]: Fix error when callback argument is an identifier with an `as` expression ([facebook#31119](facebook/react#31119)) //<Mark Skelton>// - **[047d95e85f](facebook/react@047d95e85f )**: [crud] Basic implementation ([facebook#31523](facebook/react#31523)) //<lauren>// - **[92c0f5f85f](facebook/react@92c0f5f85f )**: Track separate SuspendedOnAction flag by rethrowing a separate SuspenseActionException sentinel ([facebook#31554](facebook/react#31554)) //<Sebastian Markbåge>// - **[053b3cb050](facebook/react@053b3cb050 )**: [crud] Rename Effect type ([facebook#31557](facebook/react#31557)) //<lauren>// - **[7dd6b9e68a](facebook/react@7dd6b9e68a )**: [crud] Add enableUseResourceEffectHook flag ([facebook#31556](facebook/react#31556)) //<lauren>// - **[d8afd1c82e](facebook/react@d8afd1c82e )**: [crud] Scaffold initial types ([facebook#31555](facebook/react#31555)) //<lauren>// - **[3720870a97](facebook/react@3720870a97 )**: Log Render Phases that Never Committed ([facebook#31548](facebook/react#31548)) //<Sebastian Markbåge>// - **[8a41d6ceab](facebook/react@8a41d6ceab )**: Unify RootDidNotComplete and RootSuspendedWithDelay exit path ([facebook#31547](facebook/react#31547)) //<Sebastian Markbåge>// - **[63cde684f5](facebook/react@63cde684f5 )**: (chore): copy fix in <style> precedence error ([facebook#31524](facebook/react#31524)) //<Zack Tanner>// - **[b01722d585](facebook/react@b01722d585 )**: Format event with "warning" yellow and prefix with "Event: " ([facebook#31536](facebook/react#31536)) //<Sebastian Markbåge>// - **[c13986da78](facebook/react@c13986da78 )**: Fix Overlapping "message" Bug in Performance Track ([facebook#31528](facebook/react#31528)) //<Sebastian Markbåge>// - **[4686872159](facebook/react@4686872159 )**: Log passive commit phase when it wasn't delayed ([facebook#31526](facebook/react#31526)) //<Sebastian Markbåge>// - **[5d89471ca6](facebook/react@5d89471ca6 )**: Export __COMPILER_RUNTIME in stable ([facebook#31540](facebook/react#31540)) //<lauren>// - **[3644f0bd21](facebook/react@3644f0bd21 )**: Use completedRenderEndTime as the start of the commit phase if it's an immediate commit ([facebook#31527](facebook/react#31527)) //<Sebastian Markbåge>// - **[8657869999](facebook/react@8657869999 )**: Separate Tracks for Components and Phases ([facebook#31525](facebook/react#31525)) //<Sebastian Markbåge>// - **[b15135b9f5](facebook/react@b15135b9f5 )**: [ez] Update useMemoCache return type ([facebook#31539](facebook/react#31539)) //<lauren>// Changelog: [General][Changed] - Bump React from 18.3.1 to 19.0.0 jest_e2e[run_all_tests] Reviewed By: cortinico Differential Revision: D67018480
Summary: X-link: facebook/metro#1400 - **[372ec00c03](facebook/react@372ec00c03 )**: Update ReactDebugInfo types to declare timing info separately ([facebook#31714](facebook/react#31714)) //<Sebastian Markbåge>// - **[3d2ab01a55](facebook/react@3d2ab01a55 )**: [Flight] Extract special cases for Server Component return value position ([facebook#31713](facebook/react#31713)) //<Sebastian Markbåge>// - **[1c9b138714](facebook/react@1c9b138714 )**: Don't serialize chunk ids for Hint and Console rows ([facebook#31671](facebook/react#31671)) //<Sebastian Markbåge>// - **[de68d2f4a2](facebook/react@de68d2f4a2 )**: Register Suspense retry handlers in commit phase ([facebook#31667](facebook/react#31667)) //<Josh Story>// - **[16d2bbbd1f](facebook/react@16d2bbbd1f )**: Client render dehydrated Suspense boundaries on document load ([facebook#31620](facebook/react#31620)) //<Josh Story>// - **[5b0ef217ef](facebook/react@5b0ef217ef )**: s/server action/server function ([facebook#31005](facebook/react#31005)) //<Ricky>// - **[e3b7ef32be](facebook/react@e3b7ef32be )**: [crud] Only export uRC when flag is enabled ([facebook#31617](facebook/react#31617)) //<lauren>// - **[aba370f1e4](facebook/react@aba370f1e4 )**: Add moveBefore Experiment ([facebook#31596](facebook/react#31596)) //<Sebastian Markbåge>// - **[1345c37941](facebook/react@1345c37941 )**: Mark all lanes in order on every new render ([facebook#31615](facebook/react#31615)) //<Sebastian Markbåge>// - **[91061073d5](facebook/react@91061073d5 )**: Mark ping time as update ([facebook#31611](facebook/react#31611)) //<Sebastian Markbåge>// - **[a9f14cb44e](facebook/react@a9f14cb44e )**: Fix Logging of Immediately Resolved Promises ([facebook#31610](facebook/react#31610)) //<Sebastian Markbåge>// - **[c11c9510fa](facebook/react@c11c9510fa )**: [crud] Fix deps comparison bug ([facebook#31599](facebook/react#31599)) //<lauren>// - **[64f89510af](facebook/react@64f89510af )**: [crud] Enable on RTR FB builds ([facebook#31590](facebook/react#31590)) //<lauren>// - **[7558ffe84d](facebook/react@7558ffe84d )**: [crud] Fix copy paste typo ([facebook#31588](facebook/react#31588)) //<lauren>// - **[7c254b6576](facebook/react@7c254b6576 )**: Log yielded time in the Component Track ([facebook#31563](facebook/react#31563)) //<Sebastian Markbåge>// - **[6177b18c66](facebook/react@6177b18c66 )**: Track suspended time when the render doesn't commit because it suspended ([facebook#31552](facebook/react#31552)) //<Sebastian Markbåge>// - **[eaf2d5c670](facebook/react@eaf2d5c670 )**: fix[eslint-plugin-react-hooks]: Fix error when callback argument is an identifier with an `as` expression ([facebook#31119](facebook/react#31119)) //<Mark Skelton>// - **[047d95e85f](facebook/react@047d95e85f )**: [crud] Basic implementation ([facebook#31523](facebook/react#31523)) //<lauren>// - **[92c0f5f85f](facebook/react@92c0f5f85f )**: Track separate SuspendedOnAction flag by rethrowing a separate SuspenseActionException sentinel ([facebook#31554](facebook/react#31554)) //<Sebastian Markbåge>// - **[053b3cb050](facebook/react@053b3cb050 )**: [crud] Rename Effect type ([facebook#31557](facebook/react#31557)) //<lauren>// - **[7dd6b9e68a](facebook/react@7dd6b9e68a )**: [crud] Add enableUseResourceEffectHook flag ([facebook#31556](facebook/react#31556)) //<lauren>// - **[d8afd1c82e](facebook/react@d8afd1c82e )**: [crud] Scaffold initial types ([facebook#31555](facebook/react#31555)) //<lauren>// - **[3720870a97](facebook/react@3720870a97 )**: Log Render Phases that Never Committed ([facebook#31548](facebook/react#31548)) //<Sebastian Markbåge>// - **[8a41d6ceab](facebook/react@8a41d6ceab )**: Unify RootDidNotComplete and RootSuspendedWithDelay exit path ([facebook#31547](facebook/react#31547)) //<Sebastian Markbåge>// - **[63cde684f5](facebook/react@63cde684f5 )**: (chore): copy fix in <style> precedence error ([facebook#31524](facebook/react#31524)) //<Zack Tanner>// - **[b01722d585](facebook/react@b01722d585 )**: Format event with "warning" yellow and prefix with "Event: " ([facebook#31536](facebook/react#31536)) //<Sebastian Markbåge>// - **[c13986da78](facebook/react@c13986da78 )**: Fix Overlapping "message" Bug in Performance Track ([facebook#31528](facebook/react#31528)) //<Sebastian Markbåge>// - **[4686872159](facebook/react@4686872159 )**: Log passive commit phase when it wasn't delayed ([facebook#31526](facebook/react#31526)) //<Sebastian Markbåge>// - **[5d89471ca6](facebook/react@5d89471ca6 )**: Export __COMPILER_RUNTIME in stable ([facebook#31540](facebook/react#31540)) //<lauren>// - **[3644f0bd21](facebook/react@3644f0bd21 )**: Use completedRenderEndTime as the start of the commit phase if it's an immediate commit ([facebook#31527](facebook/react#31527)) //<Sebastian Markbåge>// - **[8657869999](facebook/react@8657869999 )**: Separate Tracks for Components and Phases ([facebook#31525](facebook/react#31525)) //<Sebastian Markbåge>// - **[b15135b9f5](facebook/react@b15135b9f5 )**: [ez] Update useMemoCache return type ([facebook#31539](facebook/react#31539)) //<lauren>// Changelog: [General][Changed] - Bump React from 18.3.1 to 19.0.0 jest_e2e[run_all_tests] Reviewed By: cortinico Differential Revision: D67018480
A long standing issue for React has been that if you reorder stateful nodes, they may lose their state and reload. The thing moving loses its state. There's no way to solve this in general where two stateful nodes swap.
The
moveBefore()
proposal has now moved to intent-to-ship. This function is kind of likeinsertBefore
but preserves state.There's a demo here. Ideally we'd port this demo to a fixture so we can try it.
Currently this flag is always off - even in experimental. That's because this is still behind a Chrome flag so it's a little early to turn it on even in experimental. So you need a custom build. It's on in RN but only because it doesn't apply there which makes it easier to tell that it's safe to ship once it's on everywhere else.
The other reason it's still off is because there's currently a semantic breaking change.
moveBefore()
errors if both nodes are disconnected. That happens if we're inside a completely disconnected React root. That's not usually how you should use React because it means effects can't read layout etc. However, it is currently supported. To handle this we'd have to try/catch themoveBefore
to handle this case but we hope this semantic will change before it ships. Before we turn this on in experimental we either have to wait for the implementation to not error in the disconnected-disconnected case in Chrome or we'd have to add try/catch.