Skip to content

Commit 46fc6e7

Browse files
authored
fix: It should use startTransition only when IS_REACT_LEGACY is false (#2756)
1 parent e510955 commit 46fc6e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mutation/src/state.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import { useIsomorphicLayoutEffect, IS_REACT_LEGACY } from 'swr/_internal'
44

55
export const startTransition: (scope: TransitionFunction) => void =
66
IS_REACT_LEGACY
7-
? React.startTransition
8-
: cb => {
7+
? cb => {
98
cb()
109
}
10+
: React.startTransition
1111

1212
/**
1313
* An implementation of state with dependency-tracking.

0 commit comments

Comments
 (0)