Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53398
ReactNativeHost is a legacy architecture class.
This migrates the app away from it and converts it to use DefaultReactHost instead.
Changelog:
[Internal] [Changed] -
Reviewed By: mdvacca
Differential Revision: D80708460
fbshipit-source-id: 7d88c440414c979a2968fc9c910e828f5851195c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53095
This change simplifies the RNTesterApplication so that it's looking closer to the template MainApplication file.
In order to do so, I had to create 2 files inside the `metainternal/` folder as those files are
generated as part of the CLI Autolinking
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D79722917
fbshipit-source-id: 06852c72ae1e1abed9952b1637515123977bc7b4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52886
RNTester was using just a plain `by lazy{}` which gets flagged by our internal linter over and over.
This fixes it.
Changelog:
[Internal] [Changed] -
Reviewed By: mdvacca
Differential Revision: D79094496
fbshipit-source-id: 856864bf8b5e4ec1254d1793dba9e97377696408
Summary:
This module is currently unused, so we can clean it up.
## Changelog:
[INTERNAL] -
Pull Request resolved: https://github.com/facebook/react-native/pull/52705
Test Plan: CI
Reviewed By: cipolleschi
Differential Revision: D78555763
Pulled By: cortinico
fbshipit-source-id: 0a6152ab3d357cac0c6d7669f292680af7b87074
Summary:
This creates a `debugOptimized` build type for React Native Android, meaning that we can run C++ optimization on the debug build, while still having the debugger enabled. This is aimed at improving the developer experience for folks developing on low-end devices or emulators.
Users that intend to debug can still use the `debug` variant where the full debug symbols are shipped.
## Changelog:
[ANDROID] [ADDED] - Create a debugOptimized buildType for Android
Pull Request resolved: https://github.com/facebook/react-native/pull/52620
Test Plan:
Tested locally with RNTester by doing:
```
./gradlew installDebugOptimized
```
This is the output of the 3 generated .aar. The size difference is a proof that we're correctly stripping out the C++ debug symbols:
<img width="193" height="54" alt="Screenshot 2025-07-15 at 17 49 50" src="https://github.com/user-attachments/assets/584a0e8d-2d17-40d4-ac29-da09049d6554" />
<img width="235" height="51" alt="Screenshot 2025-07-15 at 17 49 39" src="https://github.com/user-attachments/assets/eda8f9e7-3509-4334-8c16-990e55caa04d" />
<img width="184" height="52" alt="Screenshot 2025-07-15 at 17 49 32" src="https://github.com/user-attachments/assets/a5c94385-bc00-4484-b43e-088ee039827f" />
Rollback Plan:
Reviewed By: cipolleschi
Differential Revision: D78351347
Pulled By: cortinico
fbshipit-source-id: 568a484ba8d2ee6e089cabc95451938e853fbc54
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52545
Pull Request resolved: https://github.com/facebook/react-native/pull/51735
This diff refactors the ViewManagerInterfaces codegen to generate kotlin classes,
As a consequence of this change, there are some ViewManagerInterfaces that have changed their APIs
## Changelog: [Android][Breaking] - Migrate ViewManagerInterfaces to kotlin. Some types in code generated ViewManagerInterfaces might differ. e.g. this will start enforcing nullability in parameters of viewManagerInterface methods (e.g. String commands parameters are not nullable, view params are not nullable in any method, etc)
Reviewed By: cortinico
Differential Revision: D78118738
fbshipit-source-id: cdd9e660e55397bd0936efce1c5aaf90c2946b7a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52399
I'm raising the deprecation warnings for those methods that are using legacy arch.
Previously the `DeprecatedInNewArchitecture` was not generating warnings for user in their builds, while now the Kotlin's/Java's `DeprecatedInNewArchitecture` it will.
Changelog:
[Android] [Changed] - Introduce more deprecation warnings for Legacy Arch classes
Reviewed By: mdvacca
Differential Revision: D77736713
fbshipit-source-id: bc21729ed8253d3ec6b6a40577bcd76622c3f8a6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52322
Original commit changeset: 4a366205ea9c
Original Phabricator Diff: D77388940
Reverting the revert since it did not fix our javascript crash problem for v270 https://fburl.com/scuba/errorreporting_system_vros_javascripterrors/mtexik9e
Original diff stack: D76908041
Revert diff stack: D77388940
Changelog[Internal]:
Puting back the Kotlin Migration for ReactDelegate file
Reviewed By: cortinico
Differential Revision: D77448238
fbshipit-source-id: f41faa19f6761b7ed644e804019f5ec4738326a7
Summary:
This follows https://github.com/facebook/react-native/pull/47554
Compared to the initial proposal, I had to remove the `edgeToEdgeEnabled` property from the root `gradle.properties` and put it in the app `gradle.properties` instead (explaining the `AgpConfiguratorUtils.kt` / `GenerateEntryPointTask.kt` / `ProjectUtils.kt` / `PropertyUtils.kt` changes)
This PR:
- Enable edge-to-edge for `MainActivity` (when `edgeToEdgeEnabled` is set to `true`)
- Disable `StatusBar` `backgroundColor` and `translucent` (when `edgeToEdgeEnabled` is set to `true`)
- Enforce `statusBarTranslucent` and `navigationBarTranslucent` on `Modal` when edge-to-edge is enabled
- Add an `isEdgeToEdge` constant to `DeviceInfoModule` for [`react-native-is-edge-to-edge`](https://github.com/zoontek/react-native-edge-to-edge/tree/main/react-native-is-edge-to-edge) detection
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
- [Android] [Added] - Add edge-to-edge opt-in support
Pull Request resolved: https://github.com/facebook/react-native/pull/52088
Test Plan:
- Update `enableEdgeToEdge` value in `packages/rn-tester/android/app/gradle.properties`
- Recompile
https://github.com/user-attachments/assets/4c6beb98-fa88-427c-b62d-a42ffe5330f0
Rollback Plan:
Reviewed By: cortinico
Differential Revision: D76834213
Pulled By: alanleedev
fbshipit-source-id: c39b2cff1a5e94e31306e3b35651aa2de83d2fe6
Summary:
This PR fixes RNTester system bars background color to match the app one (not solid black).
## Changelog:
- [Internal] [Changed] - Fix RNTester app system bars color when edge-to-edge is enforced
Pull Request resolved: https://github.com/facebook/react-native/pull/51929
Test Plan:
https://github.com/user-attachments/assets/8be0b721-6514-408f-81cd-2106ae7a17c4
Rollback Plan:
Reviewed By: javache
Differential Revision: D76352950
Pulled By: alanleedev
fbshipit-source-id: 474a81564570764a597aa995a0677617263338be
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51931
This cleans up the whole `JSEngineResolutionAlgorithm` and all the API related to it.
As now we offer support only for Hermes and JSC is provided via a community package.
This is breaking as it affects Expo, but I'll reach out to Kudo to make sure this is integrated properly.
No other breakages other than this.
Changelog:
[Android] [Removed] - Remove and cleanup JSEngineResolutionAlgorithm
Reviewed By: mdvacca
Differential Revision: D76337620
fbshipit-source-id: e43d5d1164f368f5fa395971bca9c05821492dfe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51844
These just redefine the existing `receiveCommand` from the ViewManagerDelegate which already has this codegen'ed
Changelog: [Internal]
Reviewed By: cortinico, rshest
Differential Revision: D75869325
fbshipit-source-id: c8ba482075c2586caf33f46a871b5b5e16fda213
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51806
Correct the type of args, which is always non-null. This is backwards-compatible as subclasses can override this method with a more permissive nullable type and still be substitutable.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D75869317
fbshipit-source-id: 8f6c9119140794447eca55be24483a35450d7bb6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51865
As in 0.81 we're stopping 1st party support for JSC, we can now cleanup the RNTester
flavor for JSC and simplify the setup here.
Changelog:
[Internal] [Changed] -
Reviewed By: rshest
Differential Revision: D76051319
fbshipit-source-id: 79b01cc64af2466a0be47ceaa0cd211cb6b02f53
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50317
`rncore`, `FBReactNativeSpec` and `FBReactNativeComponentSpec` contain the same symbols, which leads to conflicts when we try to merge them into a single shared library. Cleanup the duplication and standardize on `FBReactNativeSpec` everywhere. I've left the Android OSS targets names as is, to avoid breaking deps.
This aligns react-native's package.json with the codegen tooling supported across iOS and Android, which is a single target for all all type-derived codegen.
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D55037569
fbshipit-source-id: dbf3c0a427c9d0df96e439b04e5b123cd1069c51
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51073
Currently the SampleLegacyModule screen is not loading in OldArch for RNTester.
That's because we gate adding a `SampleLegacyModule` to the BaseReactPackage
only if NewArch is enabled.
This shouldn't be the case as we can still build RNTester in oldarch and we
should be able to visualize the SampleLegacyModule example.
Changelog:
[Internal] [Changed] -
Reviewed By: mdvacca
Differential Revision: D74009245
fbshipit-source-id: 55eae3dc6063343f57261af2742e643a8e5c2b50
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50998
I'm reverting this as this change is too disruptive for the OSS ecosystem.
It will break ALL the apps written in Kotlin and it's coming too close to the branch cut which is in less than one week.
We need to re-do this migration in a non breaking manner after the branch cut as this is highly disruptive for little benefit at this point
Changelog
[Android][Changed] - Back out "[RN][Kotlin] Migrate ReactActivity"
Original commit changeset: 936263100ca9
Original Phabricator Diff: D73507044
Reviewed By: mdvacca
Differential Revision: D73864144
fbshipit-source-id: 264921b1f1cd38301e66364de4b619807272bd27
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50930
Due to D73591315, we don't need to specify the `legacyWarningsEnabled` for RNTester anymore as it's effectively ignored.
Changelog:
[Internal] [Changed] -
Reviewed By: rshest, cipolleschi
Differential Revision: D73654270
fbshipit-source-id: 9428634fb8374024940e4041de60d679b6f352a2
Summary:
Fixes https://github.com/facebook/react-native/issues/45857
The general idea behind this PR is the same for both platforms: dirty all nodes with `MeasurableYogaNode` trait when the layout is constrained with a new `fontSizeMultiplier`. There were a few caveats:
- `ParagraphShadowNode` marks its layout as clean in the constructor in most cases. To prevent that from using a stale measurement I'm using the font scale multiplier stored in `content_` property of the node. That value is then compared with the scale used to create the attributed string kept in the node's state. If those differ, the layout is not cleared.
- On Android, font scale wasn't passed down to the `SurfaceHandler`
- On Android, text measurement relies on cached `DisplayMetrics` which were not updated when the system font scale changed.
- `AndroidTextInputShadowNode` wasn't using `fontSizeMultiplier` at all. I needed to add it in all places where an `AttributedString` is constructed.
## Changelog:
[GENERAL] [FIXED] - Fixed text not updating correctly after changing font scale in settings
Pull Request resolved: https://github.com/facebook/react-native/pull/45978
Test Plan:
So far tested on the following code:
```jsx
function App() {
const [counter,setCounter] = useState(0);
const [text,setText] = useState('TextInput');
const [flag,setFlag] = useState(true);
return (
<SafeAreaView
style={{
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
}}
>
<Text style={{fontSize: 24}}>RN 24 Label Testing {flag ? 'A' : 'B'}</Text>
<TextInput value={text} onChangeText={setText} style={{fontSize: 24, borderWidth: 1}} placeholder="Placeholder" />
<Pressable onPress={() => setCounter(prevState => prevState + 1)} style={{backgroundColor: counter % 2 === 0 ? 'red' : 'blue', width: 200, height: 50}} />
<Pressable onPress={() => setFlag(!flag)} style={{backgroundColor: 'green', width: 200, height: 50}} />
</SafeAreaView>
);
}
```
Reviewed By: NickGerleman
Differential Revision: D71727907
Pulled By: j-piasecki
fbshipit-source-id: 240fb5fa4967a9182bce7e885798b233d1e25aea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50470
This diff introduces a new property called `legacyWarningsEnabled` for `gradle.properties` that
toggles the Legacy Arch warnings for users.
I've also introduced a new `ReactNativeApplicationEntryPoint` that is generated by RNGP. This class
effectively wrap `DefaultNewArchitectureEntryPoint` by setting warnings and also invoking SoLoader.
It will reduce the errors in the user space.
As of now warnigns appear in Logcat, but I'm looking into adding some UI in a subsequent diff.
Changelog:
[Android] [Added] - Add a `legacyWarningsEnabled` property to enable Legacy Warnings on NewArch
Reviewed By: mdvacca
Differential Revision: D72383907
fbshipit-source-id: bcd659a23ec5b468958124f0f6650ff72d01ce81
Summary:
Benchmark to test changes from https://github.com/facebook/react-native/issues/49449
Might be nice to have some version of this in the repo.
## Changelog:
[INTERNAL] [ADDED] - Setup a Macrobenchmark for RNTester
Pull Request resolved: https://github.com/facebook/react-native/pull/49486
Test Plan:
### Methodology
Picked various JS file from websites (facebook, instagram) to artificially grow RN tester bundle somewhat realistically. The files are required lazily from a button press callback to simulate the code being included, but not executed, as it would be in a large app that uses lazy requires for the different screens.
I've also made the RN tester screens lazy so all their code is not loaded initially. This is more representative of real apps. Note this is implemented in a hacky way just for the purpose of this test. It would actually be nice to implement this properly.
The tests were made using low end device Samsung Galaxy A03s.
### Compression ON with 10.5 mb bundle
#### Peak allocated memory
60.9 mb
#### ReactInstance.loadJSBundler
148.64 ms
#### Benchmark
timeToFullDisplayMs min 1,825.0, median 1,911.1, max 1,994.8
timeToInitialDisplayMs min 834.9, median 860.9, max 903.9
#### APK
Size: 22.9 mb
Download size: 14.5 mb
### Compression OFF with 10.5 mb bundle
#### Peak allocated memory
51.5 mb
#### ReactInstance.loadJSBundler
946 us
#### Benchmark
timeToFullDisplayMs min 1,752.8, median 1,827.2, max 1,977.5
timeToInitialDisplayMs min 837.7, median 881.3, max 937.2
#### APK
Size: 28 mb
Download size: 14.5 mb
Reviewed By: rshest
Differential Revision: D70002286
Pulled By: cortinico
fbshipit-source-id: 436597f439ba244649373870c1facefdb12297d9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48541
Shows how to use tintColor in conjunction with new XML file format, and serves as a good E2E test bench to ensure that drawables don't accidentally reuse the same state (if the underlying implementation isn't careful enough to call `buildCopy`, both icons will render red)
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D64136753
fbshipit-source-id: 3bd0933e587364425ac14a0635690d4b274a55fe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47681
These were deprecated back in D49262824, so should be safe to remove now.
Changelog: [Android][Removed] Removed hasConstants constructor from ReactModuleInfo
Reviewed By: mdvacca
Differential Revision: D66127070
fbshipit-source-id: 3bd441c96597598470f16c7770c4dfa4ada563a0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47484
Small change to types in the base class: all non-primitives return optional from ReadableArray, which matches the semantics in ReadableMap. We already rely on this in some cases, but the current nullability annotations were incorrect, and null values from the array would be passed through from `getMap` and `getArray`.
Changelog: [Android][Breaking] ReadableArray non-primitive getters are now correctly typed as optional
Reviewed By: Abbondanzo
Differential Revision: D65596278
fbshipit-source-id: 5574e9000b07de292bd0da5f1b071aac0eb331d6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46955
This is a major bump of Kotlin. It comes with no breaking changes for the Kotlin API, but there are several new warnigns that I had to fix.
Most importantly several `override` methods that are overriding Deprecated API, also need to be deprecated as well in Kotlin.
Changelog:
[Android] [Changed] - Bump Kotlin 1.9.x to 2.0.x
Reviewed By: tdn120
Differential Revision: D64179842
fbshipit-source-id: 295ab2636ce9f9bb04e9d8c7ed27d9f8a1a64338
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46817
As I've cleaned up all the RN Tester warnings, I'm enable warningAsErrors for RNTester to make
sure we keep up with our warning count.
Changelog:
[Internal] [Changed] - Enable warningAsErrors for RN-Tester
Reviewed By: cipolleschi
Differential Revision: D63837633
fbshipit-source-id: f83273dadc7aa10ce7ae52ae790279819fb88345
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46846
As of D61658739, BaseViewManager setting color now goes through BackgroundStyleApplicator, which gives a default implementation of setting a background color, while storing information in a way where we can impement things like border radii and shadows on background for out of the box views.
I knew this could lead to breaks where we previously overrode view-level `setBackgroundColor` to do something custom, but didn't override on VM level, but didn't see any external usages so I assumed it should be relatively safe. Turns out we have some internal usages which run into this pattern (D63913128 already fixed one), including a usage in RN itself! Let's override the view managers in these to delegate to the view's custom drawing.
Changelog:
[Android][Fixed] - Fix some cases where we override setBackgroundColor on View-level instead of VM level
Reviewed By: Abbondanzo
Differential Revision: D63922722
fbshipit-source-id: af988d1436c790be97b2be1325541aa418bf43a3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46816
This converts the same native module from Java to Kotlin.
I've converted the whole module as it was quite simple + I've fixed some of the warnings.
Changelog:
[Internal] [Changed] - Convert react/nativemodule/samples/ to Kotlin
bypass-github-export-checks
Reviewed By: javache
Differential Revision: D63837631
fbshipit-source-id: bb126d7649a6e8a36510bf2b252ecdfae91fe09f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46461
This bumps SoLoader to 0.12.1 inside React Native and cleans up the extra
`com.facebook.soloader.enabled` metadata which are not necessary anymore.
Changelog:
[Internal] [Changed] - Bump SoLoader to 0.12.1 and remove unnecessary extra manifest metadata
Reviewed By: cipolleschi
Differential Revision: D62581188
fbshipit-source-id: ff990c0af1f0f51070037fcb4c7c13fbe6bae234
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46459
After the SoLoader 0.12.0 bump I've noticed RNTester is instacrashing due to us not having enabled it
explicitely in the Manifest:
Changelog:
[Internal] [Changed] - Unblock RNTester instacrashing due to SoLoader not being enabled
Reviewed By: cipolleschi
Differential Revision: D62580751
fbshipit-source-id: 3b291e7f82daf1a6bd61bc9588c2d49a389801ef
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46422
Stubbing SoLoader comes with a couple of breaking changes (e.g. users in OSS are using `com.facebook.common.logging.FLog` which is exposed by Fresco).
In order to reduce those breaking changes, here I'm moving React Native to use SoLoader 0.12.0.
This new version comes with a constructor that accepts a MergedSoMapping implementation which we provide only for OSS apps.
Please note that the CI on this Diff will be red till SoLoader 0.12.0 releases.
Changelog:
[Internal] [Changed] - Do not stub SoLoader and use version 0.12.0
Reviewed By: cipolleschi
Differential Revision: D62447566
fbshipit-source-id: 6ff38799ed0c9f40cf3ab84be8a05979def63dc2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46354
**Issue:**
With forced edge-to-edge on Android 15, RNTester title at top overlaps with the status bar and bottom tab bar overlaps with bottom nav bar
**Solution:**
Add margins based on inset values to the ReactRootView which is the contentView for RNTesterActivity which acts as global padding within RNTester
Changelog:
[Android][Changed] - Adding padding for RNTester on Android 15 forced edge-to-edge
Reviewed By: mdvacca
Differential Revision: D62247910
fbshipit-source-id: 7b35d0c2016b6897b5de436a4245c9e910559541
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46055
Changelog: [Android][Breaking]
BaseReactPackage is a 1:1 replacement for the deprecated TurboReactPackage. TurboReactPackage has been deprecated since 0.74. let's move the codebase to the recommended standard.
Reviewed By: cortinico
Differential Revision: D61329022
fbshipit-source-id: cef69e37bb2be7f6dccbab70d0996c33a8abf091
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45873
I'm removing the Gradle dependency on OSS SoLoader and stubbing it with our own implementation.
This will allow us to implement merging of further .so libraries and
As Fresco also depends on SoLoader, I had to stub the `NativeLoader` dependency as well.
Changelog:
[Android] [Breaking] - Do not depend on OSS SoLoader anymore and do not expose Fresco `api` dependency.
Reviewed By: mdvacca
Differential Revision: D60652007
fbshipit-source-id: 6e70a5c37ba9337fbe8772e192b886ba4693c7f1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45743
This is a Java-centric class that can be replaced by Kotlin's map extensions.
Changelog:
[Android][Deprecated] Deprecate MapBuilder
Reviewed By: cortinico
Differential Revision: D60309106
fbshipit-source-id: 4a764fa1d59993dc735b2181a2270dc79a0e0396
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45598
I've noticed we attempt to load JSC from the Sonatype Snapshot repository.
That is inefficient as we already know that JSC is available only inside node modules.
This change makes the repository resolution stricter by better specifying which
repo can download which dependency.
Changelog:
[Internal] [Changed] - Do not attempt to load JSC from other repositories
Reviewed By: cipolleschi
Differential Revision: D60116002
fbshipit-source-id: 21a2213708f5b0103860a59f3342f1bc0f59cdb9