Skip to content

Fix startTransition example to wrap setState after await in server-functions#8520

Merged
gaearon merged 1 commit into
reactjs:mainfrom
Nabeel-akk:fix/starttransition-example
Jul 8, 2026
Merged

Fix startTransition example to wrap setState after await in server-functions#8520
gaearon merged 1 commit into
reactjs:mainfrom
Nabeel-akk:fix/starttransition-example

Conversation

@Nabeel-akk

Copy link
Copy Markdown
Contributor

Fix the server-functions example to wrap state updates after �wait in another startTransition, matching the documented pattern in startTransition.md (see line 43: 'Any async calls awaited in the action will be included in the transition, but currently require wrapping any set functions after the await in an additional startTransition').

Closes #7444

@gaearon gaearon merged commit 15299e5 into reactjs:main Jul 8, 2026
1 check passed
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.

[Typo]: example code contradicts other startTransition examples

2 participants