fix form state reset when component state is updated
- add test for nested state in form actions
- fix form status state reseting
Summary
Popping also occurs when the state changes for children subscribed to the transition provider. Therefore, I added a check to ensure the entire queue of the current transition is completed on popping the transition provider and before resetting the context.
I also left this as a comment
Fixes #30368 Closes #30368
How did you test this change?
The first video is before the fix with the eternal action, the second is with the fix with the eternal action, and the third is with the fix with the action set to 3 seconds:
https://github.com/user-attachments/assets/283b76c5-de38-41d7-a673-31dafe16c39d
https://github.com/user-attachments/assets/51adca34-0285-40ae-8e35-8d5d02a8ad8c
https://github.com/user-attachments/assets/435af7bf-d86d-479a-a825-4de9109973e3
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 21, 2024 4:45am |
Comparing: fa6eab58541330349480690ef4e211520cc08d94...aa6b68cc552b78f3f7612655de9e12a419cf7ed6
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.82 kB | 1.82 kB |
| oss-stable/react-dom/cjs/react-dom-client.production.js | +0.01% | 500.37 kB | 500.42 kB | +0.01% | 89.80 kB | 89.81 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.01% | 507.50 kB | 507.55 kB | = | 90.96 kB | 90.97 kB |
| facebook-www/ReactDOM-prod.classic.js | = | 595.24 kB | 595.29 kB | = | 105.55 kB | 105.56 kB |
| facebook-www/ReactDOM-prod.modern.js | = | 571.54 kB | 571.59 kB | +0.01% | 101.75 kB | 101.76 kB |
Significant size changes
Includes any change greater than 0.2%:
(No significant changes)
Generated by :no_entry_sign: dangerJS against bcc250dabf706bc706e5c61602f98a85eae4440d
This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.
Closing this pull request after a prolonged period of inactivity. If this issue is still present in the latest release, please ask for this pull request to be reopened. Thank you!
@vordgi would this fix still work? Not sure why it didn't get any attention... #30368 seems like a pretty obvious bug going from React 18/Next 14 to React 19/Next 15
Since this was closed due to inactivity, I’ve cherry-picked the commits in https://github.com/facebook/react/pull/33351