From 37ce20aa03780a242c878b86be22332c9976f2ee Mon Sep 17 00:00:00 2001 From: Anmol Julka <37598619+anmol0530@users.noreply.github.com> Date: Fri, 17 Jan 2025 20:10:13 +0530 Subject: [PATCH] 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. --- src/content/reference/react/useTransition.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/reference/react/useTransition.md b/src/content/reference/react/useTransition.md index 6b7c511e7c0..c18c5f02283 100644 --- a/src/content/reference/react/useTransition.md +++ b/src/content/reference/react/useTransition.md @@ -163,7 +163,7 @@ function CheckoutForm() { 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. -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`. +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`.