A framework for building native applications using React
Go to file
Rubén Norte 9792d5e2d1 Quick print of feature flags definitions (#47240)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47240

Changelog: [internal]

Adding a new option for the feature flags script to print the current definitions of feature flags.

```
yarn featureflags --print
```

```
┌────────────────────────────────────────────────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────┬─────────┬──────────────┐
│ (index)                                                    │ Description                                                                                               │ Purpose │ Date added   │
├────────────────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────┼──────────────┤
│ commonTestFlag                                             │ 'Common flag for testing. Do NOT modify.'                                                                 │ '🔨'    │ undefined    │
│ commonTestFlagWithoutNativeImplementation                  │ 'Common flag for testing (without native implementation). Do NOT modify.'                                 │ '🔨'    │ undefined    │
│ enableFabricLogs                                           │ 'This feature flag enables logs for Fabric.'                                                              │ '🔨'    │ undefined    │
│ jsOnlyTestFlag                                             │ 'JS-only flag for testing. Do NOT modify.'                                                                │ '🔨'    │ undefined    │
│ traceTurboModulePromiseRejectionsOnAndroid                 │ 'Enables storing js caller stack when creating promise in native module. This is useful in case of Pr...' │ '🔨'    │ undefined    │
│ batchRenderingUpdatesInEventLoop                           │ 'When enabled, the RuntimeScheduler processing the event loop will batch all rendering updates and di...' │ '🚀'    │ undefined    │
│ disableEventLoopOnBridgeless                               │ 'The bridgeless architecture enables the event loop by default. This feature flag allows us to force ...' │ '🚀'    │ undefined    │
│ enableAccessToHostTreeInFabric                             │ 'Enables access to the host tree in Fabric using DOM-compatible APIs.'                                    │ '🚀'    │ undefined    │
│ enableBridgelessArchitecture                               │ 'Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the fo...' │ '🚀'    │ undefined    │
│ enableFabricRenderer                                       │ 'Enables the use of the Fabric renderer in the whole app.'                                                │ '🚀'    │ undefined    │
│ enableFabricRendererExclusively                            │ 'When the app is completely migrated to Fabric, set this flag to true to disable parts of Paper infra...' │ '🚀'    │ undefined    │
│ enableLayoutAnimationsOnAndroid                            │ 'When enabled, LayoutAnimations API will animate state changes on Android.'                               │ '🚀'    │ undefined    │
│ enableLayoutAnimationsOnIOS                                │ 'When enabled, LayoutAnimations API will animate state changes on iOS.'                                   │ '🚀'    │ undefined    │
│ enableLongTaskAPI                                          │ 'Enables the reporting of long tasks through `PerformanceObserver`. Only works if the event loop is e...' │ '🚀'    │ undefined    │
│ enableMicrotasks                                           │ 'Enables the use of microtasks in Hermes (scheduling) and RuntimeScheduler (execution).'                  │ '🚀'    │ undefined    │
│ enableReportEventPaintTime                                 │ 'Report paint time inside the Event Timing API implementation (PerformanceObserver).'                     │ '🚀'    │ undefined    │
│ fuseboxEnabledDebug                                        │ 'Flag determining if the React Native DevTools (Fusebox) CDP backend should be enabled in debug build...' │ '🚀'    │ undefined    │
│ fuseboxEnabledRelease                                      │ 'Flag determining if the React Native DevTools (Fusebox) CDP backend should be enabled in release bui...' │ '🚀'    │ undefined    │
│ isLayoutAnimationEnabled                                   │ 'Function used to enable / disabled Layout Animations in React Native.'                                   │ '🚀'    │ undefined    │
│ useFabricInterop                                           │ 'Should this application enable the Fabric Interop Layer for Android? If yes, the application will be...' │ '🚀'    │ undefined    │
│ useModernRuntimeScheduler                                  │ 'When enabled, it uses the modern fork of RuntimeScheduler that allows scheduling tasks with prioriti...' │ '🚀'    │ undefined    │
│ useTurboModules                                            │ 'When enabled, NativeModules will be executed by using the TurboModule system'                            │ '🚀'    │ undefined    │
│ allowRecursiveCommitsWithSynchronousMountOnAndroid         │ 'Adds support for recursively processing commits that mount synchronously (Android only).'                │ '🧪'    │ '2024-05-30' │
│ animatedShouldDebounceQueueFlush                           │ 'Enables an experimental flush-queue debouncing in Animated.js.'                                          │ '🧪'    │ '2024-02-05' │
│ animatedShouldUseSingleOp                                  │ 'Enables an experimental mega-operation for Animated.js that replaces many calls to native with a sin...' │ '🧪'    │ '2024-02-05' │
│ completeReactInstanceCreationOnBgThreadOnAndroid           │ 'Do not wait for a main-thread dispatch to complete init to start executing work on the JS thread on ...' │ '🧪'    │ '2024-07-22' │
│ enableAlignItemsBaselineOnFabricIOS                        │ 'Kill-switch to turn off support for aling-items:baseline on Fabric iOS.'                                 │ '🧪'    │ '2024-07-10' │
│ enableAndroidLineHeightCentering                           │ 'When enabled, custom line height calculation will be centered from top to bottom.'                       │ '🧪'    │ '2024-09-11' │
│ enableAnimatedAllowlist                                    │ 'Enables Animated to skip non-allowlisted props and styles.'                                              │ '🧪'    │ '2024-09-10' │
│ enableAnimatedClearImmediateFix                            │ 'Enables an experimental to use the proper clearIntermediate instead of calling the wrong clearTimeou...' │ '🧪'    │ '2024-09-17' │
│ enableAnimatedPropsMemo                                    │ 'Enables Animated to analyze props to minimize invalidating `AnimatedProps`.'                             │ '🧪'    │ '2024-09-11' │
│ enableCleanTextInputYogaNode                               │ 'Clean yoga node when <TextInput /> does not change.'                                                     │ '🧪'    │ '2024-04-06' │
│ enableCppPropsIteratorSetter                               │ 'Enable prop iterator setter-style construction of Props in C++ (this flag is not used in Java).'         │ '🧪'    │ '2024-09-13' │
│ enableDeletionOfUnmountedViews                             │ 'Deletes views that were pre-allocated but never mounted on the screen.'                                  │ '🧪'    │ '2024-09-13' │
│ enableEagerRootViewAttachment                              │ 'Feature flag to configure eager attachment of the root view/initialisation of the JS code.'              │ '🧪'    │ '2024-07-28' │
│ enableEventEmitterRetentionDuringGesturesOnAndroid         │ 'Enables the retention of EventEmitterWrapper on Android till the touch gesture is over to fix a bug ...' │ '🧪'    │ '2024-08-08' │
│ enableGranularShadowTreeStateReconciliation                │ 'When enabled, the renderer would only fail commits when they propagate state and the last commit tha...' │ '🧪'    │ '2024-05-01' │
│ enableIOSViewClipToPaddingBox                              │ 'iOS Views will clip to their padding box vs border box'                                                  │ '🧪'    │ '2024-08-30' │
│ enableNewBackgroundAndBorderDrawables                      │ 'Use BackgroundDrawable and BorderDrawable instead of CSSBackgroundDrawable'                              │ '🧪'    │ '2024-09-24' │
│ enableOptimisedVirtualizedCells                            │ 'Removing unnecessary rerenders Virtualized cells after any rerenders of Virualized list. Works with ...' │ '🧪'    │ '2024-08-21' │
│ enablePreciseSchedulingForPremountItemsOnAndroid           │ 'Moves execution of pre-mount items to outside the choregrapher in the main thread, so we can estimat...' │ '🧪'    │ '2024-09-19' │
│ enablePropsUpdateReconciliationAndroid                     │ 'When enabled, Android will receive prop updates based on the differences between the last rendered s...' │ '🧪'    │ '2024-07-12' │
│ enableSynchronousStateUpdates                              │ 'Dispatches state updates synchronously in Fabric (e.g.: updates the scroll position in the shadow tr...' │ '🧪'    │ '2024-04-25' │
│ enableTextPreallocationOptimisation                        │ 'Text preallocation optimisation where unnecessary work is removed.'                                      │ '🧪'    │ '2024-09-12' │
│ enableUIConsistency                                        │ 'Ensures that JavaScript always has a consistent view of the state of the UI (e.g.: commits done in o...' │ '🧪'    │ '2024-04-25' │
│ enableViewRecycling                                        │ 'Enables View Recycling. When enabled, individual ViewManagers must still opt-in.'                        │ '🧪'    │ '2024-07-31' │
│ excludeYogaFromRawProps                                    │ 'When enabled, rawProps in Props will not include Yoga specific props.'                                   │ '🧪'    │ '2024-07-22' │
│ fixMappingOfEventPrioritiesBetweenFabricAndReact           │ 'Uses the default event priority instead of the discreet event priority by default when dispatching e...' │ '🧪'    │ '2024-06-18' │
│ fixMountingCoordinatorReportedPendingTransactionsOnAndroid │ 'Fixes a limitation on Android where the mounting coordinator would report there are no pending trans...' │ '🧪'    │ '2024-08-27' │
│ forceBatchingMountItemsOnAndroid                           │ 'Forces the mounting layer on Android to always batch mount items instead of dispatching them immedia...' │ '🧪'    │ '2024-04-10' │
│ initEagerTurboModulesOnNativeModulesQueueAndroid           │ 'Construct modules that requires eager init on the dedicate native modules thread'                        │ '🧪'    │ '2024-07-11' │
│ lazyAnimationCallbacks                                     │ 'Only enqueue Choreographer calls if there is an ongoing animation, instead of enqueueing every frame...' │ '🧪'    │ '2024-05-01' │
│ loadVectorDrawablesOnImages                                │ 'Adds support for loading vector drawable assets in the Image component (only on Android)'                │ '🧪'    │ '2024-07-12' │
│ scheduleAnimatedEndCallbackInMicrotask                     │ 'Changes the completion callback supplied via `Animation#start` to be scheduled in a microtask instea...' │ '🧪'    │ '2024-09-27' │
│ setAndroidLayoutDirection                                  │ 'Propagate layout direction to Android views.'                                                            │ '🧪'    │ '2024-05-17' │
│ shouldSkipStateUpdatesForLoopingAnimations                 │ 'If the animation is within Animated.loop, we do not send state updates to React.'                        │ '🧪'    │ '2024-07-25' │
│ shouldUseAnimatedObjectForTransform                        │ 'Enables use of AnimatedObject for animating transform values.'                                           │ '🧪'    │ '2024-02-05' │
│ shouldUseRemoveClippedSubviewsAsDefaultOnIOS               │ 'removeClippedSubviews prop will be used as the default in FlatList on iOS to match Android'              │ '🧪'    │ '2024-02-05' │
│ shouldUseSetNativePropsInFabric                            │ 'Enables use of setNativeProps in JS driven animations.'                                                  │ '🧪'    │ '2024-03-05' │
│ shouldUseSetNativePropsInNativeAnimationsInFabric          │ 'Enables use of setNativeProps in Native driven animations in Fabric.'                                    │ '🧪'    │ '2024-03-05' │
│ useImmediateExecutorInAndroidBridgeless                    │ 'Invoke callbacks immediately on the ReactInstance rather than going through a background thread for ...' │ '🧪'    │ '2024-06-06' │
│ useInsertionEffectsForAnimations                           │ 'Changes construction of the animation graph to `useInsertionEffect` instead of `useLayoutEffect`.'       │ '🧪'    │ '2024-09-12' │
│ useNativeViewConfigsInBridgelessMode                       │ 'When enabled, the native view configs are used in bridgeless mode.'                                      │ '🧪'    │ '2024-04-03' │
│ useOptimisedViewPreallocationOnAndroid                     │ 'Moves more of the work in view preallocation to the main thread to free up JS thread.'                   │ '🧪'    │ '2024-07-23' │
│ useOptimizedEventBatchingOnAndroid                         │ 'Uses an optimized mechanism for event batching on Android that does not need to wait for a Choreogra...' │ '🧪'    │ '2024-08-29' │
│ useRefsForTextInputState                                   │ 'Enable a variant of TextInput that moves some state to refs to avoid unnecessary re-renders'             │ '🧪'    │ '2024-07-08' │
│ useRuntimeShadowNodeReferenceUpdate                        │ 'When enabled, cloning shadow nodes within react native will update the reference held by the current...' │ '🧪'    │ '2024-06-03' │
│ useTurboModuleInterop                                      │ 'In Bridgeless mode, should legacy NativeModules use the TurboModule system?'                             │ '🧪'    │ '2024-07-28' │
└────────────────────────────────────────────────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────┴─────────┴──────────────┘
Summary
┌─────────────────┬────────┐
│ (index)         │ Values │
├─────────────────┼────────┤
│ Total           │ 68     │
│ Common          │ 51     │
│ JS Only         │ 17     │
│ Operational     │ 5      │
│ Release         │ 17     │
│ Experimentation │ 46     │
└─────────────────┴────────┘
Done in 1.62s.
```

```
yarn featureflags --print --json
```

```
{"common":{"commonTestFlag":{"defaultValue":false,"metadata":{"description":"Common flag for testing. Do NOT modify.","purpose":"operational"}},"commonTestFlagWithoutNativeImplementation":{"defaultValue":false,"metadata":{"description":"Common flag for testing (without native implementation). Do NOT modify.","purpose":"operational"},"skipNativeAPI":true},"allowRecursiveCommitsWithSynchronousMountOnAndroid":{"defaultValue":false,"metadata":{"dateAdded":"2024-05-30","description":"Adds support for recursively processing commits that mount synchronously (Android only).","purpose":"experimentation"}},"batchRenderingUpdatesInEventLoop":{"defaultValue":false,"metadata":{"description":"When enabled, the RuntimeScheduler processing the event loop will batch all rendering updates and dispatch them together at the end of each iteration of the loop.","purpose":"release"},"skipNativeAPI":true},"completeReactInstanceCreationOnBgThreadOnAndroid":{"defaultValue":false,"metadata":{"dateAdded":"2024-07-22","description":"Do not wait for a main-thread dispatch to complete init to start executing work on the JS thread on Android","purpose":"experimentation"}},"disableEventLoopOnBridgeless":{"defaultValue":false,"metadata":{"description":"The bridgeless architecture enables the event loop by default. This feature flag allows us to force disabling it in specific instances.","purpose":"release"}},"enableAlignItemsBaselineOnFabricIOS":{"defaultValue":true,"metadata":{"dateAdded":"2024-07-10","description":"Kill-switch to turn off support for aling-items:baseline on Fabric iOS.","purpose":"experimentation"}},"enableAndroidLineHeightCentering":{"defaultValue":false,"metadata":{"dateAdded":"2024-09-11","description":"When enabled, custom line height calculation will be centered from top to bottom.","purpose":"experimentation"}},"enableBridgelessArchitecture":{"defaultValue":false,"metadata":{"description":"Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flags: `useTurboModules` & `enableFabricRenderer.","purpose":"release"}},"enableCleanTextInputYogaNode":{"defaultValue":false,"metadata":{"dateAdded":"2024-04-06","description":"Clean yoga node when <TextInput /> does not change.","purpose":"experimentation"}},"enableCppPropsIteratorSetter":{"defaultValue":false,"metadata":{"dateAdded":"2024-09-13","description":"Enable prop iterator setter-style construction of Props in C++ (this flag is not used in Java).","purpose":"experimentation"}},"enableDeletionOfUnmountedViews":{"defaultValue":false,"metadata":{"dateAdded":"2024-09-13","description":"Deletes views that were pre-allocated but never mounted on the screen.","purpose":"experimentation"}},"enableEagerRootViewAttachment":{"defaultValue":false,"metadata":{"dateAdded":"2024-07-28","description":"Feature flag to configure eager attachment of the root view/initialisation of the JS code.","purpose":"experimentation"}},"enableEventEmitterRetentionDuringGesturesOnAndroid":{"defaultValue":false,"metadata":{"dateAdded":"2024-08-08","description":"Enables the retention of EventEmitterWrapper on Android till the touch gesture is over to fix a bug on pressable (#44610)","purpose":"experimentation"}},"enableFabricLogs":{"defaultValue":false,"metadata":{"description":"This feature flag enables logs for Fabric.","purpose":"operational"}},"enableFabricRenderer":{"defaultValue":false,"metadata":{"description":"Enables the use of the Fabric renderer in the whole app.","purpose":"release"}},"enableFabricRendererExclusively":{"defaultValue":false,"metadata":{"description":"When the app is completely migrated to Fabric, set this flag to true to disable parts of Paper infrastructure that are not needed anymore but consume memory and CPU. Specifically, UIViewOperationQueue and EventDispatcherImpl will no longer work as they will not subscribe to ReactChoreographer for updates.","purpose":"release"}},"enableGranularShadowTreeStateReconciliation":{"defaultValue":false,"metadata":{"dateAdded":"2024-05-01","description":"When enabled, the renderer would only fail commits when they propagate state and the last commit that updated state changed before committing.","purpose":"experimentation"}},"enableIOSViewClipToPaddingBox":{"defaultValue":false,"metadata":{"dateAdded":"2024-08-30","description":"iOS Views will clip to their padding box vs border box","purpose":"experimentation"}},"enableLayoutAnimationsOnAndroid":{"defaultValue":false,"metadata":{"description":"When enabled, LayoutAnimations API will animate state changes on Android.","purpose":"release"}},"enableLayoutAnimationsOnIOS":{"defaultValue":true,"metadata":{"description":"When enabled, LayoutAnimations API will animate state changes on iOS.","purpose":"release"}},"enableLongTaskAPI":{"defaultValue":false,"metadata":{"description":"Enables the reporting of long tasks through `PerformanceObserver`. Only works if the event loop is enabled.","purpose":"release"}},"enableMicrotasks":{"defaultValue":false,"metadata":{"description":"Enables the use of microtasks in Hermes (scheduling) and RuntimeScheduler (execution).","purpose":"release"},"skipNativeAPI":true},"enableNewBackgroundAndBorderDrawables":{"defaultValue":false,"metadata":{"dateAdded":"2024-09-24","description":"Use BackgroundDrawable and BorderDrawable instead of CSSBackgroundDrawable","purpose":"experimentation"}},"enablePreciseSchedulingForPremountItemsOnAndroid":{"defaultValue":false,"metadata":{"dateAdded":"2024-09-19","description":"Moves execution of pre-mount items to outside the choregrapher in the main thread, so we can estimate idle time more precisely (Android only).","purpose":"experimentation"}},"enablePropsUpdateReconciliationAndroid":{"defaultValue":false,"metadata":{"dateAdded":"2024-07-12","description":"When enabled, Android will receive prop updates based on the differences between the last rendered shadow node and the last committed shadow node.","purpose":"experimentation"}},"enableReportEventPaintTime":{"defaultValue":false,"metadata":{"description":"Report paint time inside the Event Timing API implementation (PerformanceObserver).","purpose":"release"}},"enableSynchronousStateUpdates":{"defaultValue":false,"metadata":{"dateAdded":"2024-04-25","description":"Dispatches state updates synchronously in Fabric (e.g.: updates the scroll position in the shadow tree synchronously from the main thread).","purpose":"experimentation"}},"enableTextPreallocationOptimisation":{"defaultValue":false,"metadata":{"dateAdded":"2024-09-12","description":"Text preallocation optimisation where unnecessary work is removed.","purpose":"experimentation"}},"enableUIConsistency":{"defaultValue":false,"metadata":{"dateAdded":"2024-04-25","description":"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).","purpose":"experimentation"}},"enableViewRecycling":{"defaultValue":false,"metadata":{"dateAdded":"2024-07-31","description":"Enables View Recycling. When enabled, individual ViewManagers must still opt-in.","purpose":"experimentation"}},"excludeYogaFromRawProps":{"defaultValue":false,"metadata":{"dateAdded":"2024-07-22","description":"When enabled, rawProps in Props will not include Yoga specific props.","purpose":"experimentation"}},"fixMappingOfEventPrioritiesBetweenFabricAndReact":{"defaultValue":false,"metadata":{"dateAdded":"2024-06-18","description":"Uses the default event priority instead of the discreet event priority by default when dispatching events from Fabric to React.","purpose":"experimentation"}},"fixMountingCoordinatorReportedPendingTransactionsOnAndroid":{"defaultValue":false,"metadata":{"dateAdded":"2024-08-27","description":"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.","purpose":"experimentation"}},"forceBatchingMountItemsOnAndroid":{"defaultValue":false,"metadata":{"dateAdded":"2024-04-10","description":"Forces the mounting layer on Android to always batch mount items instead of dispatching them immediately. This might fix some crashes related to synchronous state updates, where some views dispatch state updates during mount.","purpose":"experimentation"}},"fuseboxEnabledDebug":{"defaultValue":true,"metadata":{"description":"Flag determining if the React Native DevTools (Fusebox) CDP backend should be enabled in debug builds. This flag is global and should not be changed across React Host lifetimes.","purpose":"release"}},"fuseboxEnabledRelease":{"defaultValue":false,"metadata":{"description":"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.","purpose":"release"}},"initEagerTurboModulesOnNativeModulesQueueAndroid":{"defaultValue":false,"metadata":{"dateAdded":"2024-07-11","description":"Construct modules that requires eager init on the dedicate native modules thread","purpose":"experimentation"}},"lazyAnimationCallbacks":{"defaultValue":false,"metadata":{"dateAdded":"2024-05-01","description":"Only enqueue Choreographer calls if there is an ongoing animation, instead of enqueueing every frame.","purpose":"experimentation"}},"loadVectorDrawablesOnImages":{"defaultValue":false,"metadata":{"dateAdded":"2024-07-12","description":"Adds support for loading vector drawable assets in the Image component (only on Android)","purpose":"experimentation"}},"setAndroidLayoutDirection":{"defaultValue":true,"metadata":{"dateAdded":"2024-05-17","description":"Propagate layout direction to Android views.","purpose":"experimentation"}},"traceTurboModulePromiseRejectionsOnAndroid":{"defaultValue":false,"metadata":{"description":"Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.","purpose":"operational"}},"useFabricInterop":{"defaultValue":false,"metadata":{"description":"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.","purpose":"release"}},"useImmediateExecutorInAndroidBridgeless":{"defaultValue":false,"metadata":{"dateAdded":"2024-06-06","description":"Invoke callbacks immediately on the ReactInstance rather than going through a background thread for synchronization","purpose":"experimentation"}},"useModernRuntimeScheduler":{"defaultValue":false,"metadata":{"description":"When enabled, it uses the modern fork of RuntimeScheduler that allows scheduling tasks with priorities from any thread.","purpose":"release"},"skipNativeAPI":true},"useNativeViewConfigsInBridgelessMode":{"defaultValue":false,"metadata":{"dateAdded":"2024-04-03","description":"When enabled, the native view configs are used in bridgeless mode.","purpose":"experimentation"}},"useOptimisedViewPreallocationOnAndroid":{"defaultValue":false,"metadata":{"dateAdded":"2024-07-23","description":"Moves more of the work in view preallocation to the main thread to free up JS thread.","purpose":"experimentation"}},"useOptimizedEventBatchingOnAndroid":{"defaultValue":false,"metadata":{"dateAdded":"2024-08-29","description":"Uses an optimized mechanism for event batching on Android that does not need to wait for a Choreographer frame callback.","purpose":"experimentation"}},"useRuntimeShadowNodeReferenceUpdate":{"defaultValue":false,"metadata":{"dateAdded":"2024-06-03","description":"When enabled, cloning shadow nodes within react native will update the reference held by the current JS fiber tree.","purpose":"experimentation"}},"useTurboModuleInterop":{"defaultValue":false,"metadata":{"dateAdded":"2024-07-28","description":"In Bridgeless mode, should legacy NativeModules use the TurboModule system?","purpose":"experimentation"}},"useTurboModules":{"defaultValue":false,"metadata":{"description":"When enabled, NativeModules will be executed by using the TurboModule system","purpose":"release"}}},"jsOnly":{"jsOnlyTestFlag":{"defaultValue":false,"metadata":{"description":"JS-only flag for testing. Do NOT modify.","purpose":"operational"}},"animatedShouldDebounceQueueFlush":{"defaultValue":false,"metadata":{"dateAdded":"2024-02-05","description":"Enables an experimental flush-queue debouncing in Animated.js.","purpose":"experimentation"}},"animatedShouldUseSingleOp":{"defaultValue":false,"metadata":{"dateAdded":"2024-02-05","description":"Enables an experimental mega-operation for Animated.js that replaces many calls to native with a single call into native, to reduce JSI/JNI traffic.","purpose":"experimentation"}},"enableAccessToHostTreeInFabric":{"defaultValue":false,"metadata":{"description":"Enables access to the host tree in Fabric using DOM-compatible APIs.","purpose":"release"}},"enableAnimatedAllowlist":{"defaultValue":false,"metadata":{"dateAdded":"2024-09-10","description":"Enables Animated to skip non-allowlisted props and styles.","purpose":"experimentation"}},"enableAnimatedClearImmediateFix":{"defaultValue":true,"metadata":{"dateAdded":"2024-09-17","description":"Enables an experimental to use the proper clearIntermediate instead of calling the wrong clearTimeout and canceling another timer.","purpose":"experimentation"}},"enableAnimatedPropsMemo":{"defaultValue":false,"metadata":{"dateAdded":"2024-09-11","description":"Enables Animated to analyze props to minimize invalidating `AnimatedProps`.","purpose":"experimentation"}},"enableOptimisedVirtualizedCells":{"defaultValue":false,"metadata":{"dateAdded":"2024-08-21","description":"Removing unnecessary rerenders Virtualized cells after any rerenders of Virualized list. Works with strict=true option","purpose":"experimentation"}},"isLayoutAnimationEnabled":{"defaultValue":true,"metadata":{"description":"Function used to enable / disabled Layout Animations in React Native.","purpose":"release"}},"scheduleAnimatedEndCallbackInMicrotask":{"defaultValue":false,"metadata":{"dateAdded":"2024-09-27","description":"Changes the completion callback supplied via `Animation#start` to be scheduled in a microtask instead of synchronously executed.","purpose":"experimentation"}},"shouldSkipStateUpdatesForLoopingAnimations":{"defaultValue":false,"metadata":{"dateAdded":"2024-07-25","description":"If the animation is within Animated.loop, we do not send state updates to React.","purpose":"experimentation"}},"shouldUseAnimatedObjectForTransform":{"defaultValue":false,"metadata":{"dateAdded":"2024-02-05","description":"Enables use of AnimatedObject for animating transform values.","purpose":"experimentation"}},"shouldUseRemoveClippedSubviewsAsDefaultOnIOS":{"defaultValue":false,"metadata":{"dateAdded":"2024-02-05","description":"removeClippedSubviews prop will be used as the default in FlatList on iOS to match Android","purpose":"experimentation"}},"shouldUseSetNativePropsInFabric":{"defaultValue":true,"metadata":{"dateAdded":"2024-03-05","description":"Enables use of setNativeProps in JS driven animations.","purpose":"experimentation"}},"shouldUseSetNativePropsInNativeAnimationsInFabric":{"defaultValue":false,"metadata":{"dateAdded":"2024-03-05","description":"Enables use of setNativeProps in Native driven animations in Fabric.","purpose":"experimentation"}},"useInsertionEffectsForAnimations":{"defaultValue":false,"metadata":{"dateAdded":"2024-09-12","description":"Changes construction of the animation graph to `useInsertionEffect` instead of `useLayoutEffect`.","purpose":"experimentation"}},"useRefsForTextInputState":{"defaultValue":false,"metadata":{"dateAdded":"2024-07-08","description":"Enable a variant of TextInput that moves some state to refs to avoid unnecessary re-renders","purpose":"experimentation"}}}}
```

Reviewed By: mdvacca

Differential Revision: D64406244

fbshipit-source-id: 6f82da64d1212faf6d5a82862a71fbc1d168134b
2024-10-29 08:02:54 -07:00
.bundle
.circleci Remove CCI leftovers (#45589) 2024-07-23 06:40:08 -07:00
.github Backport to main fixes in publishing the template (#47250) 2024-10-28 09:58:38 -07:00
flow-typed/npm add yargs#usage typing (#46983) 2024-10-11 11:27:09 -07:00
gradle/wrapper Gradle to 8.10.2 (#46656) 2024-09-27 00:43:25 -07:00
jest RN: Fix lint/sort-imports Errors (#47109) 2024-10-18 04:07:02 -07:00
packages Quick print of feature flags definitions (#47240) 2024-10-29 08:02:54 -07:00
scripts Generalize feature flags script (#47208) 2024-10-29 08:02:54 -07:00
tools RN: Fix sort-imports Lint Configuration (#47104) 2024-10-17 17:06:20 -07:00
.babelrc Move react-native-babel-transformer and react-native-babel-preset from Metro to React Native repo (#38228) 2023-07-27 11:48:16 -07:00
.clang-format Add QualifierAlignment to Clang Format Config (#44098) 2024-04-15 16:03:26 -07:00
.editorconfig
.eslintignore directly call community-cli-plugin in react-native-xcode.sh (#44721) 2024-06-05 09:08:16 -07:00
.eslintrc.js RN: Fix sort-imports Lint Configuration (#47104) 2024-10-17 17:06:20 -07:00
.flowconfig Deploy 0.250.0 to xplat (#47108) 2024-10-17 19:54:04 -07:00
.gitignore Remove references to old template (#46082) 2024-08-19 09:19:35 -07:00
.prettierignore Fixes enum codegen value cases (#44654) 2024-06-07 07:53:59 -07:00
.prettierrc Format code-workspace file, clarify use of .vscode/ dir (#44874) 2024-06-11 09:27:48 -07:00
build.gradle.kts Make build_android publish to the staging repositories (#45468) 2024-07-16 13:58:43 -07:00
CHANGELOG-pre-060.md
CHANGELOG-pre-070.md Remove duplicate changelog entry (#38177) 2023-07-05 09:32:10 -07:00
CHANGELOG.md Changelog for 0.76.0 (#47118) 2024-10-23 10:37:58 -07:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md
ECOSYSTEM.md
Gemfile Pin Xcodeproj to < 1.26.0 (#47237) 2024-10-28 04:20:31 -07:00
Gemfile.lock feat: add conditionals for iOS only code in RCTDeviceInfo.mm (#45176) 2024-06-28 06:02:38 -07:00
gradle.properties Bump AGP to 8.1.1 (#39392) 2023-09-12 09:21:08 -07:00
gradlew Gradle to 8.9 (#45407) 2024-07-12 09:00:39 -07:00
gradlew.bat Gradle to 8.10 (#46369) 2024-09-06 09:28:13 -07:00
jest.config.js fix: running local tests (#46615) 2024-09-25 05:51:49 -07:00
LICENSE
LICENSE-docs
package.json Generalize feature flags script (#47208) 2024-10-29 08:02:54 -07:00
react-native.code-workspace Format code-workspace file, clarify use of .vscode/ dir (#44874) 2024-06-11 09:27:48 -07:00
README.md docs: bump minSdk to 23 (#42034) 2023-12-21 22:29:00 -08:00
runXcodeTests.sh
settings.gradle.kts Revert D59170923 (#45447) 2024-07-15 13:44:09 -07:00
yarn.lock Deploy 0.250.0 to xplat (#47108) 2024-10-17 19:54:04 -07:00

React Native

Learn once, write anywhere:
Build mobile apps with React.

React Native is released under the MIT license. Current CircleCI build status. Current npm package version. PRs welcome! Follow @reactnative

Getting Started · Learn the Basics · Showcase · Contribute · Community · Support

React Native brings React's declarative UI framework to iOS and Android. With React Native, you use native UI controls and have full access to the native platform.

  • Declarative. React makes it painless to create interactive UIs. Declarative views make your code more predictable and easier to debug.
  • Component-Based. Build encapsulated components that manage their state, then compose them to make complex UIs.
  • Developer Velocity. See local changes in seconds. Changes to JavaScript code can be live reloaded without rebuilding the native app.
  • Portability. Reuse code across iOS, Android, and other platforms.

React Native is developed and supported by many companies and individual core contributors. Find out more in our ecosystem overview.

Contents

📋 Requirements

React Native apps may target iOS 13.4 and Android 6.0 (API 23) or newer. You may use Windows, macOS, or Linux as your development operating system, though building and running iOS apps is limited to macOS. Tools like Expo can be used to work around this.

🎉 Building your first React Native app

Follow the Getting Started guide. The recommended way to install React Native depends on your project. Here you can find short guides for the most common scenarios:

📖 Documentation

The full documentation for React Native can be found on our website.

The React Native documentation discusses components, APIs, and topics that are specific to React Native. For further documentation on the React API that is shared between React Native and React DOM, refer to the React documentation.

The source for the React Native documentation and website is hosted on a separate repo, @facebook/react-native-website.

🚀 Upgrading

Upgrading to new versions of React Native may give you access to more APIs, views, developer tools, and other goodies. See the Upgrading Guide for instructions.

React Native releases are discussed in this discussion repo.

👏 How to Contribute

The main purpose of this repository is to continue evolving React Native core. We want to make contributing to this project as easy and transparent as possible, and we are grateful to the community for contributing bug fixes and improvements. Read below to learn how you can take part in improving React Native.

Code of Conduct

Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.

Contributing Guide

Read our Contributing Guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to React Native.

Open Source Roadmap

You can learn more about our vision for React Native in the Roadmap.

Good First Issues

We have a list of good first issues that contain bugs which have a relatively limited scope. This is a great place to get started, gain experience, and get familiar with our contribution process.

Discussions

Larger discussions and proposals are discussed in @react-native-community/discussions-and-proposals.

📄 License

React Native is MIT licensed, as found in the LICENSE file.

React Native documentation is Creative Commons licensed, as found in the LICENSE-docs file.