File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import App from '../apps' ;
22import { featureFlags } from 'react-native-screens' ;
33
4- featureFlags . experiment . synchronousScreenUpdatesEnabled = false ;
4+ featureFlags . experiment . synchronousScreenUpdatesEnabled = true ;
55featureFlags . experiment . synchronousHeaderConfigUpdatesEnabled = true ;
66featureFlags . experiment . synchronousHeaderSubviewUpdatesEnabled = true ;
77featureFlags . experiment . androidResetScreenShadowStateOnOrientationChangeEnabled =
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ - (void)initCommonProps
103103 _sheetsScrollView = nil ;
104104 _sheetContentHeight = 0.0 ;
105105 _markedForUnmountInCurrentTransaction = NO ;
106+ _synchronousShadowStateUpdatesEnabled = YES ;
106107}
107108
108109+ (RNSViewInteractionManager *)viewInteractionManagerInstance
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ export interface NativeProps extends ViewProps {
121121 leftScrollEdgeEffect ?: CT . WithDefault < ScrollEdgeEffect , 'automatic' > ;
122122 rightScrollEdgeEffect ?: CT . WithDefault < ScrollEdgeEffect , 'automatic' > ;
123123 topScrollEdgeEffect ?: CT . WithDefault < ScrollEdgeEffect , 'automatic' > ;
124- synchronousShadowStateUpdatesEnabled ?: CT . WithDefault < boolean , false > ;
124+ synchronousShadowStateUpdatesEnabled ?: CT . WithDefault < boolean , true > ;
125125}
126126
127127export default codegenNativeComponent < NativeProps > ( 'RNSModalScreen' , {
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ export interface NativeProps extends ViewProps {
121121 leftScrollEdgeEffect ?: CT . WithDefault < ScrollEdgeEffect , 'automatic' > ;
122122 rightScrollEdgeEffect ?: CT . WithDefault < ScrollEdgeEffect , 'automatic' > ;
123123 topScrollEdgeEffect ?: CT . WithDefault < ScrollEdgeEffect , 'automatic' > ;
124- synchronousShadowStateUpdatesEnabled ?: CT . WithDefault < boolean , false > ;
124+ synchronousShadowStateUpdatesEnabled ?: CT . WithDefault < boolean , true > ;
125125 androidResetScreenShadowStateOnOrientationChangeEnabled ?: CT . WithDefault <
126126 boolean ,
127127 true
Original file line number Diff line number Diff line change 1- const RNS_SYNCHRONOUS_SCREEN_STATE_UPDATES_DEFAULT = false ;
1+ const RNS_SYNCHRONOUS_SCREEN_STATE_UPDATES_DEFAULT = true ;
22const RNS_SYNCHRONOUS_HEADER_CONFIG_STATE_UPDATES_DEFAULT = true ;
33const RNS_SYNCHRONOUS_HEADER_SUBVIEW_STATE_UPDATES_DEFAULT = true ;
44const RNS_ANDROID_LEGACY_TOP_INSET_BEHAVIOR_DEFAULT = false ;
@@ -195,6 +195,11 @@ export const featureFlags = {
195195 * Flags to enable experimental features. These might be removed w/o notice or moved to stable.
196196 */
197197 experiment : {
198+ /**
199+ * Enables synchronous shadow state updates for Screen components on iOS
200+ * (Fabric, RN 0.82+). On by default.
201+ * PR: https://github.com/software-mansion/react-native-screens/pull/3282
202+ */
198203 get synchronousScreenUpdatesEnabled ( ) {
199204 return synchronousScreenUpdatesAccessor . get ( ) ;
200205 } ,
You can’t perform that action at this time.
0 commit comments