Skip to content

Commit 37ce20a

Browse files
authored
Fix grammatical error in documentation for isPending state behavior
This commit corrects a grammatical error in the description of isPending state behavior. The unclear phrase "to isPending state switches to true" has been rephrased for clarity: "To give the user feedback about in-progress Transitions, the isPending state switches to true at the first call to startTransition and remains true until all actions are complete and the final state is shown to the user." The update improves readability and ensures the documentation is clear and accurate.
1 parent b22cbc3 commit 37ce20a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/reference/react/useTransition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ function CheckoutForm() {
163163

164164
The function passed to `startTransition` is called the "Action". You can update state and (optionally) perform side effects within an Action, and the work will be done in the background without blocking user interactions on the page. A Transition can include multiple Actions, and while a Transition is in progress, your UI stays responsive. For example, if the user clicks a tab but then changes their mind and clicks another tab, the second click will be immediately handled without waiting for the first update to finish.
165165

166-
To give the user feedback about in-progress Transitions, to `isPending` state switches to `true` at the first call to `startTransition`, and stays `true` until all Actions complete and the final state is shown to the user. Transitions ensure side effects in Actions to complete in order to [prevent unwanted loading indicators](#preventing-unwanted-loading-indicators), and you can provide immediate feedback while the Transition is in progress with `useOptimistic`.
166+
To give the user feedback about in-progress Transitions, the `isPending` state switches to `true` at the first call to `startTransition`, and stays `true` until all Actions complete and the final state is shown to the user. Transitions ensure side effects in Actions to complete in order to [prevent unwanted loading indicators](#preventing-unwanted-loading-indicators), and you can provide immediate feedback while the Transition is in progress with `useOptimistic`.
167167

168168
<Recipes titleText="The difference between Actions and regular event handling">
169169

0 commit comments

Comments
 (0)