Commit Graph

416 Commits

Author SHA1 Message Date
Andrei Marchenko aafe696453 turn on by default optimization for memoization of virtualized list cells (#47724)
Summary:
Changelog: [General] [Changed] - Fix unnececary rerenders of VirtualizedListCells with strictMode={true}

Pull Request resolved: https://github.com/facebook/react-native/pull/47724

Reviewed By: sammy-SC

Differential Revision: D66123469

fbshipit-source-id: 295e10add51bc1c319b8b8e3a9f4874c5e5a386d
2024-11-20 16:00:03 -08:00
Riccardo Cipolleschi 102062fbc7 Extract RCTAppDependencyProvider in a separate pod (#47761)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47761

When breaking the last dependency, we created the `RCTApDependencyProvider` in the Codegen pod.

This is not an issue per sè. The problem comes in with the new template in Swift: ReactCodegen contains some headers with some C++ code that Swift can't really process.

That's why most libraries started failing in jobs like [this one](https://github.com/facebook/react-native/actions/runs/11906196751/job/33177904733): the template app was not able to load the `ReactCodegen` pod in the Swift app delegate.

Given that the app delegate only have to actually load the RCTAppDependencyProvider, I extracted that class in its own pod: ReactAppDependencyProvider.

The name of the pod does not follow the React-RCTXXX structure because that will create issues with the import statements and the `use_frameworks!`  use case.

> [!NOTE]
> We need to update the template and change the `import ReactCodegen` to `import ReactAppDependencyProvider`

## Changelog:
[iOS][Added] - Extract RCTAppDependencyProvider in the ReactAppDependencyProvider pod

Reviewed By: blakef

Differential Revision: D66241941

fbshipit-source-id: 6b888109c65d9560fff322ec84a16da78fbcd64b
2024-11-20 10:51:56 -08:00
Samuel Susla d2723b8ed7 delete feature flag useSetNativePropsInNativeAnimationsInFabric
Summary: changelog: [internal]

Reviewed By: dmytrorykun

Differential Revision: D66230767

fbshipit-source-id: 8f133a313e42a5dc7136e88a3ce68835d420ced9
2024-11-20 07:25:56 -08:00
Simon Krueger 4dd8d3db57 Use folly::fileops qualified name lookup (#47608)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47608

This is a codemod. It was automatically generated and will be landed once it is approved and tests are passing in sandcastle.
You have been added as a reviewer by Sentinel or Butterfly.

Autodiff project: fileops2
Autodiff partition: xplat.js.react-native-github.packages.react-native.ReactCommon.cxxreact
Autodiff bookmark: ad.fileops2.xplat.js.react-native-github.packages.react-native.ReactCommon.cxxreact

This updates `open`, `close`, `read`, `write`, and `pipe` call sites to use
`folly::fileops` qualified name lookup.

This is the 2nd phase in a 3-phase change to remove folly's global definitions
of the posix functions that conflict with windows CRT.
The 1st phase created namespaces for folly's posix functions. The 2nd phase
updates callsites to use the qualified name of folly's  `open`, `close`,
`read`, `write`, and `pipe`  functions. The 3rd and final phase will remove
folly's globally defined posix functions and have windows CRT define them
again.

**What is the reason for this change?**
Folly's global definitions of posix functions on Windows causes `#include`
order issues if folly is not included first.

For example, when `gtest/gtest.h` is included before folly, gtest includes
`windows.h` and that declares `open`, `read`, and `chdir`, which creates
ambiguous references to folly's `open`, `read`, and `chdir`.

Another example is where posix functions go undeclared when
`folly/portability/windows.h` is included without other portability headers
(e.g., `folly/portability/unistd.h`). `folly/portability/windows.h` includes
`windows.h` in a way that only underscore versions of the posix functions are
available (e.g., `_open`, `_close`).

These issues create friction for windows development.

**Background: What is the purpose of `folly::portability::{fcntl,stdlib,sysstat,unistd}`?**
It is a portability layer to make posix functions available and behave
consistently across platforms. Some posix functions don't exist on windows
(e.g., `sysconf`). Some other posix functions, folly changes to adapt behavior
across platforms. For example, on windows folly defines `open`, `read`,
`write`, and `close` functions to work with sockets. Folly makes these
functions available in the global scope for convenience.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D65855147

fbshipit-source-id: b06863330ca213b9d1bffe0ee85e0fbf1bc8a845
2024-11-20 06:27:34 -08:00
Nick Gerleman e88974f199 Cleanup "setAndroidLayoutDirection" (#47736)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47736

This has been 100% enabled in production across all the apps for more than a month, after an experiment a long time ago, and we kinda depend on it now for correct border drawing in some cases. Let's clean it up!

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D66208418

fbshipit-source-id: 582a38bd84a2d085ba5c4aac4cd478680dd206cc
2024-11-19 21:42:01 -08:00
Tim Yung 29a0d7c3b2 RN: Feature Flag to Disable InteractionManager in Batchinator (#47690)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47690

Creates a feature flag to evalute the impact of disabling `InteractionManager` in `Batchinator` and synchronously invoking callbacks after the timeout.

This also deletes the `dispose` arguments in `Batchinator` that were unused.

Changelog:
[Internal]

Reviewed By: bvanderhoof

Differential Revision: D66139643

fbshipit-source-id: d17bab0cd25c0c69779686cb435c063f707255e4
2024-11-18 23:12:15 -08:00
Rubén Norte 3986eefed1 Clean up feature flag allowRecursiveCommitsWithSynchronousMountOnAndroid (#47665)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47665

Changelog: [Android][Fixed] Fixes some deadlocks when doing commits and state updates synchronously from the UI thread (e.g.: from reanimated).

This removes the gating for the fix to allow recursive commits with synchronous mount on Android.

See https://github.com/facebook/react-native/pull/44725#issuecomment-2427579065 and https://github.com/software-mansion/react-native-reanimated/issues/6418#issuecomment-2296107100.

Reviewed By: sammy-SC

Differential Revision: D66095539

fbshipit-source-id: 63b8c4d9161a40159601b8e3b45f7e5c7cdd83e4
2024-11-18 08:13:17 -08:00
Riccardo Cipolleschi 41c2502b36 Generate RCTAppDependencyProvider for apps (#47650)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47650

## This Change:

This change generates the `RCTAppDependencyProvider` for the apps, so that the amount of changes required by the users is minimal.

## Context

React Native has a last temporal dependency on Codegen in the React-RCTAppDelegate pod.

The RCTAppDelegate has the responsibility to provide various dependencies to react native, like third party components and various modules. ReactCodegen is generated when the user create the project, while React-RCTAppDelegate eists in React Native itself.

This dependency means that we cannot prepare prebuilt for iOS for React Native because when we would have to create prebuilds, we would need the React Codegen, but we can't create a React codegen package that will fit all the apps, because React Codegen can contains App Specific modules and components and apps might have different dependencies.

## Changelog:
[iOS][Added] - Introduce the RCTAppDependencyProvider to minimize the changes required y the users

Reviewed By: dmytrorykun

Differential Revision: D66074456

fbshipit-source-id: 073022e66da53eca6bf948aeda01f17ad85793ff
2024-11-18 08:06:13 -08:00
Samuel Susla 6f1c2a512e synchronise dispatching of view commands through RuntimeScheduler (#47604)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47604

## Changelog:

[iOS] [Fixed] - Fixed use of view commands from layout effects

Mounting of views is delayed by runtime scheduler to allow React to run layout effects. Execution of view commands must by queued together with mounting of views, otherwise it might be executed before views are mounted. When this happens, view commands are ignored.

So before, if view command was executed from layout effect (or ref function), it would get dispatched to the UI thread as quickly as possible. But mounting of views would be delayed. To fix this, both mounting of views and view commands are put on the same queue inside of RuntimeScheduler.

## What about Android?
Android employs a [retry mechanism](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.java#L211) that was needed for react tag based view commands. In paper, one could send a view command to a react tag which was completely disconnected from whether a view exists or not.

iOS was built with ref commands in mind, so it doesn't have this mechanism.

Fixes: https://github.com/facebook/react-native/issues/47576

Reviewed By: javache, cipolleschi

Differential Revision: D65909191

fbshipit-source-id: 9d2a444879bee62a7b8b7d31edde450e18339b89
2024-11-16 08:22:37 -08:00
Tim Yung 316170ce8d RN: Enable useInsertionEffectsForAnimations (#47595)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47595

Enables the `useInsertionEffectsForAnimations` feature flag by default. This changes `useAnimatedProps` to enqueue updates to the `AnimatedNode` graph in `useInsertionEffect` instead of `useLayoutEffect`.

The main motivation for `useInsertionEffect` is to avoid unmounting `AnimatedNode` graphs when an `Activity` subtree becomes hidden.

Both `useInsertionEffect` and `useLayoutEffect` occur during the commit phase. Although they occur at different moments in the commit phase, the different is difficult to observe and unlikely to impact product code.

One observable impact is that with `useInsertionEffect`, animations can now be started from layout effects.

Changelog:
[General][Changed] - The `AnimatedNode` graph will not occur during the insertion effect phase, which means animations can now be reliably started during layout effects.

Reviewed By: mdvacca

Differential Revision: D65906157

fbshipit-source-id: d09b2f1b76079eecafbed8c6f5d8ee4695a1f81c
2024-11-13 16:29:32 -08:00
Pieter De Baets 9fa4845136 Change default for bridgeless-init related feature flags (#47567)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47567

Changelog: [Android][Changed] Invocations to JS will now invoke their callbacks immediately if the instance is ready. Surface starts will not wait for the main thread to become available to dispatch the work in JS.

Reviewed By: rshest

Differential Revision: D65661888

fbshipit-source-id: c67802bd56fac6bc6c145b96d823274e2b97de69
2024-11-13 04:00:19 -08:00
Pieter De Baets 663b5f9d19 Change feature flag default for initEagerTurboModulesOnNativeModulesQueueAndroid (#47566)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47566

Changelog: [Android][Changed] TurboModules marked as requiring eager init will now be constructed on the mqt_native thread to increase concurrency in React Native init.

Reviewed By: rshest

Differential Revision: D65661887

fbshipit-source-id: c1863ea44771de5caedc2968a325abcc7022c792
2024-11-13 04:00:19 -08:00
Rubén Norte d3c5446a6e Clean up legacy feature flags for event loop (#47565)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47565

Changelog: [internal]

We unified the feature flags for the event loop in https://github.com/facebook/react-native/pull/47084, but we left the legacy flags defined for temporary backwards compatibility.

We don't need that anymore, so we can clean them up.

Reviewed By: fabriziocucci

Differential Revision: D65606068

fbshipit-source-id: 403c278cef2afc8eddf07592d88cadc58765f660
2024-11-12 12:43:11 -08:00
Riccardo Cipolleschi fe1057afcd Let lib maintainer be explicit with componentProvider mapping (#47520)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47520

Right now, when a 3p library needs to register a component in the component system, we have to crawl the library to try and get the mappng, best effort.

With this approach, we are enriching the `codegenConfig` property to allow library developers to define the mapping themselves.

For example:
```json
//...
"codegenConfig": {
    //..
    "ios": {
      "componentProvider": {
        "RNTMyNativeView": "RNTMyNativeViewComponentView"
      }
    }
  },
```
means that the JS component `RNTMyNativeView` will be mapped to the `RNTMyNativeViewComponentView` class.

This also work for local apps, and it warns the users about what libraries are using the deprecated approach, so they can open an issue or a PR to those libraries.

## Changelog:
[iOS][Added] - Allow 3p developers to specify the association between components and classes in Fabric

Reviewed By: dmytrorykun

Differential Revision: D65666061

fbshipit-source-id: 692e753635873ff9260e131d2d18ed226b2378c2
2024-11-12 07:38:03 -08:00
Riccardo Cipolleschi 8becc2514d Generate RCTThirdPartyComponentProvider (#47518)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47518

This change reintroduce the generation of the `RCTThirdPartyComponentProvider` but in the right place and with the right patterns.

1. We are generating it in the user space, not in the node_modules (fixes the circular dependency)
2. We are not using weak function signature that have to be implicitly linked to some symbols found during compilation

The change needs to crawl the folder to retrieve the information it needs. We need to implement it this way not to be breaking with respect of the current implementation.

The assumption is that components have a function in their `.mm` file with this shape:
```objc
Class<RCTComponentViewProtocol> <componentName>Cls(void)
{
  return <ComponentViewClass>.class;
}
```
I verified on GH that all the libraries out there follow this pattern.

A better approach will let library owner to specify the association of `componentName, componentClass` in the `codegenConfig`.

We will implement that as the next step and we will support both for some versions for backward compatibility.

## Changelog
[iOS][Changed] - Change how components automatically register

Reviewed By: dmytrorykun

Differential Revision: D65614347

fbshipit-source-id: a378b8bc31c1ab3d49552f2f6a4c86c3b578746b
2024-11-12 07:38:03 -08:00
Riccardo Cipolleschi 60b9d3d89e Stop generating RCTThirdPartyLibraryComponentProvider (#47517)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47517

The `RCTThirdPartyLibraryComponentProvider` has been introduced to automate the component registration of third party libraries in the apps. However, it has some serious flaws:

* It is generated in the React/Fabric folder, which means that it is generated in node_modules
* It is generated when the user installs the components in the app, which means that we can't prebuild and redistribute React Native as a binary
* it does not work with Frameworks and dynamic linking: in this scenarion, Fabric must build in isolation and if there are third party libraries involved, the lookup of the `xxxCls` function will fail

This change removes the generation of the `RCTThirdPartyLibraryComponentProvider`. In the next diffs we will implement a different mechanism to register components

## Changelog
[iOS][Changed] - Stop generating the RCTThirdPartyLibraryComponentProvider

Reviewed By: dmytrorykun

Differential Revision: D65601939

fbshipit-source-id: 9cc8c46102827d124b93b8aa6705b5e6014695c1
2024-11-12 07:38:03 -08:00
Rubén Norte d7cb6d95a8 Clean up forceBatchingMountItemsOnAndroid feature flag (#47546)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47546

Changelog: [internal]

Cleaning up the feature flag as we've tested it's safe to land.

Reviewed By: javache

Differential Revision: D65749504

fbshipit-source-id: 964db7e9c31ebb8d7e4f7e2703a3040709c6ed6e
2024-11-11 06:05:28 -08:00
Riccardo Cipolleschi 97a4234b6e Fix Typo and skip generation of app-specific component registration (#47547)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47547

In [#47176](https://github.com/facebook/react-native/pull/47176) we disabled the generation of the component registration for app specific components as it was creating a circular dependency between the app and React Native.

However, we made a couple of typos that make it not work as expected and users picked up those typos soon.

This change fixes them for good.

## Changelog
[iOS][Fixed] - Properly stop generating component registration for components defined in app.

Reviewed By: blakef

Differential Revision: D65750433

fbshipit-source-id: 1a879c5be014905558b9fd05e6f16ac36b784ed6
2024-11-11 04:55:23 -08:00
Tim Yung 090501d26d RN: Enable scheduleAnimatedEndCallbackInMicrotask (#47503)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47503

Enables the `scheduleAnimatedEndCallbackInMicrotask` feature flag that was introduced in https://github.com/facebook/react-native/pull/46714.

Changelog:
[General][Changed] - Callbacks passed to `animation.start(<callback>)` will be scheduled for execution in a microtask. Previously, there were certain scenarios in which the callback could be synchronously executed by `start`.

Reviewed By: javache

Differential Revision: D65645981

fbshipit-source-id: ac159208b7c1df60549baa52704bb0e704da0acf
2024-11-08 10:22:12 -08:00
Nicola Corti 7e268c9d52 Revert React 19RC to React 18.3.1 (#47380)
Summary:
While we're waiting for 19 stable, let's bring main back to 18.3.1 ahead of the 0.77 branch cut. We'll land this change just after 19 stable lands.

This is a cherry pick of b93b378fa0 which landed in 0.76 already

bypass-github-export-checks

## Changelog:

[INTERNAL] - Revert React 19RC to React 18.3.1

Pull Request resolved: https://github.com/facebook/react-native/pull/47380

Test Plan: CI

Reviewed By: cipolleschi

Differential Revision: D65430775

Pulled By: cortinico

fbshipit-source-id: f0f211754c8ffe5d037fd299e4de52c29d1d7913
2024-11-08 08:27:37 -08:00
Tim Yung f0ffcd4f5d RN: Enable enableAnimatedAllowlist and enableAnimatedPropsMemo (#47502)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47502

Enables the two following feature flags:

- `enableAnimatedAllowlist`
- `enableAnimatedPropsMemo`

The former enables the use of an experimental optimization to provide `unstable_createAnimatedComponentWithAllowlist` and `useAnimatedProps` an allowlist of props that reduces the set of props iterated over by to find props with `AnimatedNode` (e.g. `Animated.Value`) instance values.

The latter enables improved memoization logic in `Animated` so that its intenal state is invalidated less frequently, reducing the cost of updating `Animated` components.

Changelog:
[General][Changed] - Optimized the performance of updating `Animated` components.

Reviewed By: rozele

Differential Revision: D65645985

fbshipit-source-id: 85f9e53072f09a59589d76d0c096f4cedd17bb4b
2024-11-07 23:43:30 -08:00
Tim Yung bf31c8f077 RN: Feature Flag to Disable InteractionManager (#47475)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47475

Creates a feature flag to evalute the impact of disabling `InteractionManager` and replacing its scheduling behavior with `setImmediate`.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D65577455

fbshipit-source-id: c0dc2b4d062eff4929ef37c5e217fd194addd790
2024-11-07 09:29:44 -08:00
Riccardo Cipolleschi ffa159e147 Set ASSUME_NONULL in codegen files (#47481)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47481

The Codegenerated files has this option turned off.
This is causing Xcode to output hundreds of warnings due to missing nullability options. RThis fixes them.

## CHANGELOG
[Internal] - Set ASSUME_NONNULL regions in codegen'd files

Reviewed By: dmytrorykun

Differential Revision: D65596598

fbshipit-source-id: bbf664944e103c05ef593a7e07bf5b767445950c
2024-11-07 04:50:55 -08:00
Riccardo Cipolleschi ace690aba9 Generate RN specific Files in RN (#47458)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47458

We are in a weird situation where React Native depends on some files that are generated by Codegen.

Codegen runs in the user project, so those dependencies are not available to React Native if we try to build it in isolation.

This is a problem and a blocker to prepare the prebuilds for iOS.

This image show the changes we are introducing:
On the right we have the current situation.
On the left the new one.

{F1954418630}

## Changelog:
[Internal] - Generate React Native specific code inside React Native

Reviewed By: cortinico, blakef

Differential Revision: D65541505

fbshipit-source-id: 1412d7f23c4d2230b795af41f1e832c8a70d5859
2024-11-07 04:08:58 -08:00
Oskar Kwaśniewski 5e18f7f788 fix: typo in spm.rb (#47480)
Summary:
This PR fixes a typo in spm.rb

## Changelog:

[IOS] [FIXED] - Typo in spm.rb

Pull Request resolved: https://github.com/facebook/react-native/pull/47480

Test Plan: N/a

Reviewed By: GijsWeterings

Differential Revision: D65596339

Pulled By: cortinico

fbshipit-source-id: c318cec1422dbcb322e70dc5f189d86af42b626d
2024-11-07 04:01:20 -08:00
Nick Gerleman 41265bac6b Reimplement Android lineHeight positioning/determination (#47271)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47271

Let's keep the recent goals of centering (instead of arbitrary prioritizing ascent), ala spec, and make some changes to allow overlapping interior line-boxes, and make the implementation a lot simpler, instead of the cruft it has been accumulating.

The new simple versions is implemented as the only `CustomLineHeightSpan`. This replaces the code used when `enableAndroidLineHeightCentering` is enabled (which is now the default).

Legacy path is renamed to `LegacyLineHeightSpan`, slated to be deleted if rollout goes well.

We cannot yet cause text to overflow the bounds of the underlying TextView until potentially large later work related to ReactTextView reimplementation.

There's a somewhat arbitrary choice here, when rounding, to whether we ceil ascent vs descent when pixels don't evenly split. This does result in a visual difference, and for sake of avoiding breakage of screenshots, I left the same choice as before.

Changelog:
[Android][Fixed] - Reimplement Android lineHeight positioning/determination

Reviewed By: javache

Differential Revision: D64716557

fbshipit-source-id: 5a947377df7cfee9dff4484c840939f527caf94b
2024-10-29 17:53:16 -07:00
Ramanpreet Nara eb3977eccf earlyjs: Introduce flag for always available js error handling
Summary:
This diff introduces ReactNativeFeatureFlags.useAlwaysAvailableJSErrorHandling.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D64791786

fbshipit-source-id: 81cf3ed1fc7057638d7d817f1fea5fc371b53646
2024-10-29 14:24:27 -07:00
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
Rubén Norte 66ffa5ee4d Small improvement in types for feature flags definitions in JS (#47239)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47239

Changelog: [internal]

Small refactor of the types for feature flags in JS to make objects read-only.

Reviewed By: mdvacca

Differential Revision: D65058612

fbshipit-source-id: 0d72df2f4afebf0426b9ac76a8f8b195c74fea52
2024-10-29 08:02:54 -07:00
Rubén Norte 66df63d3b5 Generalize feature flags script (#47208)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47208

Changelog: [internal]

Small change to unify the yarn commands for feature flags into a single `featureflags` command with options.

Reviewed By: NickGerleman, mdvacca

Differential Revision: D64982509

fbshipit-source-id: 3f9d7ac35f61950bd03fef243e1a95625144a0cd
2024-10-29 08:02:54 -07:00
Samuel Susla 741ae296d9 ship optimisation enableTextPreallocationOptimisation (#47257)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47257

changelog: [internal]

Reviewed By: NickGerleman, rshest

Differential Revision: D65068406

fbshipit-source-id: 2e54e0e42e9d30f14c139ac039378d3cb4897067
2024-10-29 07:20:16 -07:00
Samuel Susla 21b99d9981 delete stale flag enableCleanTextInputYogaNode (#47256)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47256

changelog: [internal]

no plans to ship this. Let's delete the feature flag for now.

Reviewed By: rshest

Differential Revision: D65068295

fbshipit-source-id: 0b68e331c54c4989e6227d3e40a3bade30aa49d1
2024-10-29 07:20:16 -07:00
Pieter De Baets bd133b5dd5 Add featureflag to not re-order mount items in FabricMountingManager (#46702)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46702

In https://github.com/facebook/react-native/pull/44188, we've started combining multiple transactions in a single transaction, to meet React's atomicity requirements, while also dealing with the constraints of Android's Fabric implementation.

This revealed a bug where in some scenarios (especially when using transitions), a node may be deleted and created during the same transaction. The current implementation of FabricMountingManager assumes it can safely reorder some operations, which it does to optimize the size of IntBufferBatch mount items. This is however incorrect and unsafe when multiple transactions are merged.

**Example:**

Differentiator output:

```
# Transaction 1
Remove #100 from #11
Delete #100

# Transaction 2
Create #100
Insert #100 into #11
```
FabricMountingManager output
```
Remove #100 from #11
Insert #100 into #11
Delete #100
```

Note that the create action is also skipped, because we only update `allocatedViewTags` after processing all mutations, leading FabricMountingManager to assume creation is not required.

This leads to an invalid state in SurfaceMountingManager, which will be surfaced as a crash in `getViewState` on the next mutation that interacts with these views.

Changelog: [Android][Fixed] Fix crash in getViewState when using suspense fallbacks.

Reviewed By: sammy-SC

Differential Revision: D63148523

fbshipit-source-id: 07ae26b2f7b7eba1b9784041dd3059b0956c035e
2024-10-28 06:18:43 -07:00
David Vacca 26278b10b1 Migrate enableCppPropsIteratorSetter to ReactNativeFeatureFlags (#45602)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45602

Migrate enableCppPropsIteratorSetter to ReactNativeFeatureFlags

Changelog: [Internal] internal

Reviewed By: rubennorte

Differential Revision: D60022936

fbshipit-source-id: 88fe6f41af3dea0ac5de4a097901a7e8df39efb2
2024-10-25 08:32:20 -07:00
Alan Lee 37375d8aba bump Folly to 2024.10.14.00 (#47033)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47033

Lastest Folly has updates to fix build errors with LLVM 19 which is also llikely needed for NDK 27

- https://github.com/facebook/folly/commit/bf46c8a21ffa288d756cea2ad455b5f012c3231f

- also add folly's new dependency fast_float
- update fmt version

Changelog:
[General][Changed] - Bump Folly to 2024.10.14.00

Reviewed By: NickGerleman

Differential Revision: D64372125

fbshipit-source-id: 1a88f1bc2af7bedce96437f2dba5b6e0fe9ea772
2024-10-24 10:10:19 -07:00
Riccardo Cipolleschi dc7e9e2d83 Exclude generation of app-defined components from RCTThirdPartyFabricComponentsProvider (#47176)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47176

While writing the guide for the New Architecture, we realized that we need to exclude the generation of the Cls function in the RCTThirdPartyFabricComponentsProvider for components defined in the app.

This is needed because a component that is defined in the app will have those function defined in the app project. However, the RCTThirdPartyFabricComponentsProvider is generated in Fabric, inside the Pods project.

The pod project needs to build in isolation from the app and cocoapods then link the app to the pods project. But the compilation of the pods project fails if one of the symbol needed by the pods lives in the app.

By disabling the generation of that function in th RCTThirdPartyFabricComponentsProvider, we can successfully build the app.

The downside is that the user needs to register the component manually, but this is not an issue because if they are writing a component in the app space, they have all the information tomanually register it in the AppDelegate

## Changelog
[iOS][Fixed] - Do not generate the ComponentCls function in the RCTThirdPartyFabricComponentsProvider for components deined in the app.

Reviewed By: cortinico, blakef

Differential Revision: D64739896

fbshipit-source-id: 0eca818ea0198532a611377d14a3ff4c95cb5fe3
2024-10-24 09:36:07 -07:00
Jorge Cabiedes Acosta cc23aea2fc Enable new **Border** and **Background** drawables on BackgroundStyleApplicator (#47124)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47124

With this we start the experiment to analyze the effect of the new `BackgroundDrawable.kt` and `BorderDrawable.kt` classes. This is also essentially a kotlinification of `CSSBackgroundDrawable`

We also start using CompositeBackgroundDrawable as the source of truth for **borderRadius** and **borderInsets**

We are hoping to get neutral results and a general win for code readability.

In general when the FeatureFlag passes we should not generate a CSSBackgroundDrawable at all and just use BackgroundDrawable and BorderDrawable

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D63287222

fbshipit-source-id: 7ca98290c2e152b22d09b838e5f0e1cac97b1268
2024-10-21 21:24:19 -07:00
Rubén Norte 2d9fe11578 Unify feature flags for event loop (2nd attempt) (#47084)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47084

Changelog: [internal]

This unifies all the feature flags that control the new event loop on RN. Before, we'd have granular flags for different aspects of it. With this diff, we enable the event loop by default with bridgeless, and we introduce a new flag to explicitly disable it in that case if necessary.

When we're ready to clean up this opt-out, we just need to remove the `&& !ReactNativeFeatureFlags::disableEventLoopOnBridgeless()` conditions.

Reviewed By: fkgozali

Differential Revision: D64464902

fbshipit-source-id: d1a0ba38dd4c189c2da905b49de23a821223ac3a
2024-10-17 04:42:37 -07:00
Rubén Norte f92863e815 Add support for feature flags without native implementation (#47059)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47059

Changelog: [internal]

This adds a new configuration for feature flags to preserve their definition only in JavaScript and skip their native API and implementations. This is useful to preserve the API in JavaScript when JavaScript changes progress faster than native changes.

Reviewed By: sammy-SC

Differential Revision: D64464779

fbshipit-source-id: 0af9624daad7bd655172905f8f616d53655cb407
2024-10-17 04:42:37 -07:00
Samuel Susla 4e12b86bfc delete fetchImagesInViewPreallocation feature flag (#47056)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47056

changelog: [internal]

Reviewed By: Abbondanzo

Differential Revision: D64464758

fbshipit-source-id: 88b8deacac273b693c4bcdd195cbf46441330b0b
2024-10-16 09:08:28 -07:00
Shawn Dempsey 85f1d9a518 Back out "Unify feature flags for event loop" (#47041)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47041

Original commit changeset: b879447def8a

Original Phabricator Diff: D64175216

Reviewed By: fkgozali

Differential Revision: D64439014

fbshipit-source-id: efc1bb7baa547d270322aabf6c5a4f50ace23e1b
2024-10-15 21:53:42 -07:00
Rubén Norte f9460deda7 Clean up feature flag removeNestedCallsToDispatchMountItemsOnAndroid (#47026)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47026

Changelog: [internal]

Clean up feature flag after we tested it's safe.

Reviewed By: javache

Differential Revision: D64332654

fbshipit-source-id: 33e92abb24c9350628a814ecab195f995316d2bc
2024-10-15 10:59:03 -07:00
Rubén Norte 9e5b6e88c5 Unify feature flags for event loop (#46953)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46953

Changelog: [internal]

This unifies all the feature flags that control the new event loop on RN. Before, we'd have granular flags for different aspects of it. With this diff, we enable the event loop by default with bridgeless, and we introduce a new flag to explicitly disable it in that case if necessary.

When we're ready to clean up this opt-out, we just need to remove the `&& !ReactNativeFeatureFlags::disableEventLoopOnBridgeless()` conditions.

Reviewed By: javache

Differential Revision: D64175216

fbshipit-source-id: b879447def8ab47c6ab772812ff1031177494069
2024-10-15 09:44:01 -07:00
Riccardo Cipolleschi 7b6e8e7765 Codegen fails with Local Module (#47027)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47027

While I was writing the documentation for extracting a module in a library, I realized that Codegen ignored the local node modules.

The reason is that `require.resolve` fails to resolve a local path.

bypass-github-export-checks

## Changelog
[General][Fixed] - Make Codegen work with local modules

Reviewed By: cortinico

Differential Revision: D64242713

fbshipit-source-id: cc5167665a49df1d09eb66a0dc9d76466f087a25
2024-10-15 09:30:50 -07:00
Rubén Norte c86b5c1232 Add new dangerouslyForceOverride method to feature flags (#46963)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46963

Changelog: [internal]

This introduces a new method in `ReactNativeFeatureFlags` to force setting overrides without triggering any errors (they're returned a string instead to be handled in userland). This is partially equivalent to calling `dangerouslyReset` and `override` but completely avoids the hard crashes that could be caused by race conditions.

Reviewed By: javache, rshest

Differential Revision: D64186262

fbshipit-source-id: 854caa03810ec78217999292a4335dad373b7fcb
2024-10-11 10:05:25 -07:00
Nick Lefever aacd4bba29 Disable shadow node reference updates by default (#46961)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46961

Changelog: [Internal]
Runtime Shadow Node Reference Syncing causes asserts when updating the shadow tree without passing through the JS-thread. This diff disables the feature by default to avoid the asserts encountered on RN Windows.

Reviewed By: sammy-SC

Differential Revision: D64188839

fbshipit-source-id: eb65206662d842f8150f1771c86dc8d190cbc3aa
2024-10-11 08:35:34 -07:00
Blake Friedman eeaa3ff458 Let .xcode.env.local NODE_BINARY handle path spaces
Summary:
For users who may have node installed in a path with a space, this requires escaping.  For example:

```
NODE_BINARY=/Users/blakef/Library/Application Support/fnm/node-versions/v20.12.0/installation/bin/node
```

Needs to be:

```
NODE_BINARY=/Users/blakef/Library/Application\ Support/fnm/node-versions/v20.12.0/installation/bin/node
```

# Changelog
[iOS][Fixed] Generated NODE_BINARY in .xcode.env.local now supports paths with a space

Reviewed By: cipolleschi

Differential Revision: D64080118

fbshipit-source-id: 1045473e4fd284fc570fa538984618630be1af6d
2024-10-09 04:14:31 -07:00
Rubén Norte 5f00db970f Use CommonJS in feature flags definitions to simplify loading from Node.js (#46887)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46887

Changelog: [internal]

This is a small change to use CommonJS in `ReactNativeFeatureFlags.config.js` so the file can be easily imported from Node.js.

Reviewed By: jorge-cab

Differential Revision: D64039860

fbshipit-source-id: c84ddbdbfe942224e213d12b9496c41b73dd5731
2024-10-09 03:40:20 -07:00
Arushi Kesarwani 52f8c57ac6 RN][Android] Add a ReactNativeFeatureFlag to enable/disable LayoutAnimations in Android (#46904)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46904

Add a ReactNativeFeatureFlag to enable/disable LayoutAnimations in Android, default false

Changelog: [internal] internal

Reviewed By: fryfrog

Differential Revision: D64073913

fbshipit-source-id: 0d92fd47c4905e74d734113e921511120037bd8d
2024-10-08 16:11:12 -07:00
Arushi Kesarwani 05cc40952c Revert D64062268: Add a ReactNativeFeatureFlag to enable/disable LayoutAnimations in Android
Differential Revision:
D64062268

Original commit changeset: 474e191e6a67

Original Phabricator Diff: D64062268

fbshipit-source-id: 9003d52d60b98999a478d2bf797e2ad58c82054d
2024-10-08 15:14:27 -07:00