File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,11 @@ const offlineConfig: IConfig = {
23
23
// save startTransition as var to avoid webpack analysis (https://github.com/webpack/webpack/issues/14814)
24
24
const _startTransition = 'startTransition' ;
25
25
// fallback for React <18 which doesn't support startTransition
26
- const startTransition = React [ _startTransition ] || ( fn => fn ( ) ) ;
26
+ const isReactNative = typeof navigator !== 'undefined' && navigator ?. product === 'ReactNative' ;
27
+ // Fallback for React <18 and exclude startTransition if in React Native
28
+ const startTransition : ( fn : ( ) => void ) => void = ! isReactNative && React [ _startTransition ]
29
+ ? React [ _startTransition ]
30
+ : ( fn => fn ( ) ) ;
27
31
28
32
const FlagProvider : FC < PropsWithChildren < IFlagProvider > > = ( {
29
33
config : customConfig ,
You can’t perform that action at this time.
0 commit comments