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 = {
2323// save startTransition as var to avoid webpack analysis (https://github.com/webpack/webpack/issues/14814)
2424const _startTransition = 'startTransition' ;
2525// 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 ( ) ) ;
2731
2832const FlagProvider : FC < PropsWithChildren < IFlagProvider > > = ( {
2933 config : customConfig ,
You can’t perform that action at this time.
0 commit comments