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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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