Skip to content

docs: explain how to preserve form state after submission#8465

Open
rylansedlacek wants to merge 1 commit into
reactjs:mainfrom
rylansedlacek:main
Open

docs: explain how to preserve form state after submission#8465
rylansedlacek wants to merge 1 commit into
reactjs:mainfrom
rylansedlacek:main

Conversation

@rylansedlacek
Copy link
Copy Markdown

@rylansedlacek rylansedlacek commented Jun 1, 2026

Form page now explains how to preserve form state after submission when using forms.

In the issue it was mentioned that uncontrolled fields are reset after successful actions, but there is no explanation on how to opt out of that behavior.

This change adds a new section demonstrating how to use onSubmit together with startTransition to preserve form values while still using transitions.

Resolves #8397

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

Size changes

Details

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Suggestion]: improve <Form> documentation to explain how to keep form state after submission

1 participant