Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/content/reference/react/useTransition.md
Original file line number Diff line number Diff line change
Expand Up @@ -1684,7 +1684,7 @@ startTransition(() => {
});
```

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we keep this focused on correcting the async claim and preserve the original flow into the example?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made this change! Thanks for your contribution!!

The function you pass to `startTransition` must be synchronous. You can't mark an update as a Transition like this:
The function you pass to `startTransition` can be synchronous or asynchronous. However, updates scheduled in a `setTimeout` callback aren't marked as Transitions:

```js
startTransition(() => {
Expand Down
Loading