Skip to content

Commit 23adab6

Browse files
committed
Updates to transition doc
1 parent 8eaef56 commit 23adab6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

docs/explanation/react-transitions.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ We first leveraged `React.startTransition` to make React Router more Suspense-fr
3232
This default behavior has 2 potential issues that `unstable_useTransitions` is designed to solve:
3333

3434
- There are some valid use cases where you _don't_ want your updates wrapped in `startTransition`
35-
- One specific issue is that `React.useSyncExternalStore` is incompatible with Transitions ([^1][uses-transition-issue], [^2][uses-transition-tweet]) so if you are using that in your application, you can run into tearing issues when combined with `React.startTransition`
36-
- React Router has a `flushSync` option on navigations to use [`React.flushSync`][flush-sync] for the state updates instead, but that's not always the proper solution
35+
- One specific issue is that `React.useSyncExternalStore` updates can't be Transitions ([^1][uses-transition-issue], [^2][uses-transition-tweet]). `useSyncExternalStore` forces a sync update, which means fallbacks can be shown in update transitions that would otherwise avoid showing the fallback.
36+
- React Router has a `flushSync` option on navigations to use [`React.flushSync`][flush-sync] for state updates instead, but that's not always a proper solution
3737
- React 19 has added a new `startTransition(() => Promise))` API as well as a new `useOptimistic` hook to surface updates during Transitions
3838
- Without some updates to React Router, `startTransition(() => navigate(path))` doesn't work as you might expect, because we are not using `useOptimistic` internally so router state updates don't surface during the navigation, which breaks hooks like `useNavigation`
3939

@@ -56,8 +56,6 @@ If your application is not "Transition-friendly" due to the usage of `useSyncExt
5656

5757
This will stop the router from wrapping internal state updates in `startTransition`.
5858

59-
<docs-warning>We do not recommend this as a long-term solution because opting out of Transitions means that your application will not be fully compatible with the modern features of React, including `Suspense`, `use`, `startTransition`, `useOptimistic`, `<ViewTransition>`, etc.</docs-warning>
60-
6159
### Opt-in via `unstable_useTransitions=true`
6260

6361
<docs-info>Opting into this feature in Framework or Data Mode requires that you are using React 19 because it needs access to [`React.useOptimistic`][use-optimistic]</docs-info>

0 commit comments

Comments
 (0)