React Native Feature Flags
This object provides access to internal React Native feature flags.
All the methods are thread-safe if you handle override
correctly.
Functions
Enables start- and finishOperationBatch on any platform.
Common flag for testing. Do NOT modify.
Use a C++ implementation of Native Animated instead of the platform implementation.
This is a combination of dangerouslyReset
and override
that reduces the likeliness of a race condition between the two calls.
Removes the overridden feature flags and makes the API return default values again.
Prevent FabricMountingManager from reordering mountItems, which may lead to invalid state on the UI thread
When enabled, Android will accumulate updates in rawProps to reduce the number of mounting instructions for cascading re-renders.
Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flags: useTurboModules
&enableFabricRenderer
.
Enable prop iterator setter-style construction of Props in C++ (this flag is not used in Java).
Feature flag to configure eager attachment of the root view/initialisation of the JS code.
This feature flag enables logs for Fabric.
Enables the use of the Fabric renderer in the whole app.
When enabled, Android will build and initiate image prefetch requests on ImageShadowNode::layout
iOS Views will clip to their padding box vs border box
Trigger JS runtime GC on memory pressure event on iOS
When enabled, LayoutAnimations API will animate state changes on Android.
When enabled, LayoutAnimations API will animate state changes on iOS.
Enables the reporting of long tasks through PerformanceObserver
. Only works if the event loop is enabled.
Makes modules requiring main queue setup initialize on the main thread, during React Native init.
Parse CSS strings using the Fabric CSS parser instead of ViewConfig processing
Use BackgroundDrawable and BorderDrawable instead of CSSBackgroundDrawable
When enabled, Android will receive prop updates based on the differences between the last rendered shadow node and the last committed shadow node.
Report paint time inside the Event Timing API implementation (PerformanceObserver).
Dispatches state updates synchronously in Fabric (e.g.: updates the scroll position in the shadow tree synchronously from the main thread).
Ensures that JavaScript always has a consistent view of the state of the UI (e.g.: commits done in other threads are not immediately propagated to JS during its execution).
Enables View Culling: as soon as a view goes off screen, it can be reused anywhere in the UI and pieced together with other items to create new UI elements.
Enables View Recycling. When enabled, individual ViewManagers must still opt-in.
Enables View Recycling for
Enables View Recycling for
Uses the default event priority instead of the discreet event priority by default when dispatching events from Fabric to React.
Fixes a limitation on Android where the mounting coordinator would report there are no pending transactions but some of them were actually not processed due to the use of the push model.
Flag determining if the React Native DevTools (Fusebox) CDP backend should be enabled in release builds. This flag is global and should not be changed across React Host lifetimes.
Enable network inspection support in the React Native DevTools CDP backend. Requires enableBridgelessArchitecture
. This flag is global and should not be changed across React Host lifetimes.
Overrides the feature flags with the ones provided by the given provider (generally one that extends ReactNativeFeatureFlagsDefaults
).
When enabled, mutex _turboModuleManagerDelegateMutex in RCTTurboModuleManager will not be used
Throw an exception instead of deadlocking when a TurboModule that requires main queue setup is initialized during a synchronous render on iOS.
Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
In Bridgeless mode, use the always available javascript error reporting pipeline.
If true, focusing in ReactEditText will mainly use stock Android requestFocus() behavior. If false it will use legacy custom focus behavior.
Should this application enable the Fabric Interop Layer for Android? If yes, the application will behave so that it can accept non-Fabric components and render them on Fabric. This toggle is controlling extra logic such as custom event dispatching that are needed for the Fabric Interop Layer to work correctly.
When enabled, the native view configs are used in bridgeless mode.
Uses an optimized mechanism for event batching on Android that does not need to wait for a Choreographer frame callback.
Instead of using folly::dynamic as internal representation in RawProps and RawValue, use jsi::Value
In Bridgeless mode, should legacy NativeModules use the TurboModule system?
When enabled, NativeModules will be executed by using the TurboModule system