From fb6c0d29e6ca7608ea137f62683d11cd43cbba02 Mon Sep 17 00:00:00 2001 From: "Stanislav (Stanley) Modrak" <44023416+smith558@users.noreply.github.com> Date: Mon, 20 Jul 2026 11:14:06 +0100 Subject: [PATCH 1/2] Update caveats for useTransition documentation Clarify conditions for marking state updates as Transitions with `startTransition`. --- src/content/reference/react/useTransition.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/content/reference/react/useTransition.md b/src/content/reference/react/useTransition.md index 472224e58d9..f83617f2ecb 100644 --- a/src/content/reference/react/useTransition.md +++ b/src/content/reference/react/useTransition.md @@ -105,7 +105,8 @@ function SubmitButton({ submitAction }) { * `useTransition` is a Hook, so it can only be called inside components or custom Hooks. If you need to start a Transition somewhere else (for example, from a data library), call the standalone [`startTransition`](/reference/react/startTransition) instead. -* You can wrap an update into a Transition only if you have access to the `set` function of that state. If you want to start a Transition in response to some prop or a custom Hook value, try [`useDeferredValue`](/reference/react/useDeferredValue) instead. +* A state update is marked as a Transition only if its setter runs inside `startTransition`, directly or through a callback. If you only have the updated value from a prop or custom Hook, use +[`useDeferredValue`](/reference/react/useDeferredValue) instead. * The function you pass to `startTransition` is called immediately, marking all state updates that happen while it executes as Transitions. If you try to perform state updates in a `setTimeout`, for example, they won't be marked as Transitions. From 5c2b9b0ed1c0e6e6960684598a2f97d0ec0a7119 Mon Sep 17 00:00:00 2001 From: "Stanislav (Stanley) Modrak" <44023416+smith558@users.noreply.github.com> Date: Mon, 20 Jul 2026 12:16:28 +0100 Subject: [PATCH 2/2] Fix Lint formatting issue --- src/content/reference/react/useTransition.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/content/reference/react/useTransition.md b/src/content/reference/react/useTransition.md index f83617f2ecb..7e92df71234 100644 --- a/src/content/reference/react/useTransition.md +++ b/src/content/reference/react/useTransition.md @@ -103,10 +103,9 @@ function SubmitButton({ submitAction }) { #### Caveats {/*starttransition-caveats*/} -* `useTransition` is a Hook, so it can only be called inside components or custom Hooks. If you need to start a Transition somewhere else (for example, from a data library), call the standalone [`startTransition`](/reference/react/startTransition) instead. +* `useTransition` is a Hook, so it can only be called inside components or custom Hooks. If you need to start a Transition somewhere else (for example, from a data library), call the standalone [`startTransition`](/reference/react/startTransition) instead. -* A state update is marked as a Transition only if its setter runs inside `startTransition`, directly or through a callback. If you only have the updated value from a prop or custom Hook, use -[`useDeferredValue`](/reference/react/useDeferredValue) instead. +* A state update is marked as a Transition only if its setter runs inside `startTransition`, directly or through a callback. If you only have the updated value from a prop or custom Hook, use [`useDeferredValue`](/reference/react/useDeferredValue) instead. * The function you pass to `startTransition` is called immediately, marking all state updates that happen while it executes as Transitions. If you try to perform state updates in a `setTimeout`, for example, they won't be marked as Transitions.