Skip to content

docs: wrap state updates after await in startTransition#8443

Merged
gaearon merged 1 commit into
reactjs:mainfrom
Dotify71:fix/issue-7444-start-transition-await
Jul 9, 2026
Merged

docs: wrap state updates after await in startTransition#8443
gaearon merged 1 commit into
reactjs:mainfrom
Dotify71:fix/issue-7444-start-transition-await

Conversation

@Dotify71

Copy link
Copy Markdown
Contributor

Fixes #7444

Under React 19 concurrent rendering, state updates that happen after an await statement inside a startTransition or useTransition callback are not automatically treated as transitions. To ensure they are handled properly and don't prematurely dismiss loading indicators (isPending), they must be wrapped in a nested startTransition call.

This PR updates the example code in server-functions.md and use-server.md to reflect this behavior, keeping them consistent with other startTransition examples in the documentation.

@github-actions

Copy link
Copy Markdown

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! 🙌

@Dotify71 Dotify71 force-pushed the fix/issue-7444-start-transition-await branch from c70132f to 1a80fe6 Compare June 24, 2026 16:04
@gaearon gaearon merged commit e51fc36 into reactjs:main Jul 9, 2026
3 checks 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