Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53885
Changelog: [General][Added] DevServer banners can now be closed on tap. On iOS, don't close them after 15s anymore.
Banners, on iOS, but not Android, are currently closed after 15s since {D47478373} where it was introduced to deal with the banner telling users they need to connect to Metro stuck forever.
Instead of closing it after 15 seconds, allow the users on both Android and iOS to close it via a touch.
Reviewed By: huntie
Differential Revision: D82727997
fbshipit-source-id: 5aa2af78a4dbcd95b69423d52421900d4ab35244
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53784
LayoutAnimation is part of legacy architecture, I'm deleting the code used from its non supported public APIs
changelog: [internal] internal
Reviewed By: shwanton
Differential Revision: D82235545
fbshipit-source-id: 9665c57b68eba9d958d3f8b9dd4224558cc8e9f6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53884
Changelog: [Internal]
Now that there's a clear display for when HMR is disconnected, we don't want to show messages regardless devices connection and disconnection to the DevServer because they are too partial.
Reviewed By: huntie
Differential Revision: D82727105
fbshipit-source-id: 32dd077f85d2044f89ae2d8d60a37c0ec6cccbbf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53883
Changelog: [General][Added] - new banner added to indicate that Fast Refresh has lost connection, and that the app needs to be restarted to reconnect
When HMR were getting disconnected, we were not giving any indication for the user.
This lead to situations were the connection is re-established, but HMR is still disconnected, which is unexpected for users.
Instead, raise a banner hinting the user to reload the app to reconnect.
Reviewed By: huntie
Differential Revision: D82726853
fbshipit-source-id: d5f264547b2af89e9dc2a9046d063efe1145d690
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53846
Changelog: [Android][Added] - hot reload banner is now displayed in blue background like on iOS
iOS has a colorful "Refreshing..." banner:
{F1982086204}
While android doesn't respect the color HMR asks it to set up for the banner:
{F1982086218}
Reviewed By: cortinico
Differential Revision: D82726743
fbshipit-source-id: 4042851f5a8fd7d4f238f25e2d83f77144742de9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53881
Changelog: [Internal]
To make sure that coverage is insertect correctly when run in different metro setup where patterns do not match perfectly, we need to add glob prefix
Reviewed By: sammy-SC
Differential Revision: D82968565
fbshipit-source-id: c2676ef4c774411938039fc5b98a3b953f6ec916
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53642
## Context
One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).
To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.
## Changed
In this change we are adding a function that is used to orchestrate the helpers function defined in previous changes.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D81778457
fbshipit-source-id: b4ab8c902d6d7e6ca4b89ccbab75c1b5d84ce00a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53640
## Context
One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).
To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.
## Changed
In this change we are adding an helper function to create hard links to Codegen Headers so that other libraries can access them.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D81778450
fbshipit-source-id: e9f62f1c81ce8a635cc880007f495de342342a25
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53638
## Context
One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).
To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.
## Changed
In this change we are adding an helper function that creates links for the ThirdPartyDependencies that React native and libraries might need to access.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D81778459
fbshipit-source-id: b8f9f207a0fbe2265e2861bf508516946905b472
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53635
## Context
One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).
To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.
## Changed
In this change we did two things:
1. we move the helper functions to a headers-utils.js file (and the tests to the `headers-utils-test.js` file)
2. we added a function that coordinates the creation of the header links *and added tests for it)
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D81778464
fbshipit-source-id: fd8eb5a7af55db0a08c4d299c5470058d5424768
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53631
## Context
One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).
To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.
## Changed
In this change we are adding an helper function that creates links for the ReactCommon folder that has a complex structure and complex mapping requirements
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D81778470
fbshipit-source-id: e0f4001048fcde0e988fc3a05b53efb1de70460b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53629
## Context
One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).
To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.
## Changed
In this change we are adding a function to properly create the header structure for the headers in ReactApple that requires a special case.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D81778471
fbshipit-source-id: 095d901dce139cf8221251f952f474be943a5ab3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53620
## Context
One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).
To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.
## Changed
In this change we are adding an helper function that creates links between a source folder and a destination folder.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D81778469
fbshipit-source-id: 3954bc219f32ea53744393a83f3179beeaca95b3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53737
This change add a utility function to extract headers (both .h and .hpp) from a folder. It also allow to exclude some specific folders (e.g.: `tests`, non supported platforms, ...)
## Context
SwiftPM is very picky in how the header structure must be.
In order to preserve the import/include statements as much as possible when building from source, we can recreate the header structure in a temporary folder inside the react-native package using symlinks.
In this way, users can still modify the headers and build RNTester and HelloWorld using SwiftPM without breaking changes.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D82205692
fbshipit-source-id: 4fa6dee2ae4790c583beb96a959b0c3045c7b50a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53736
This change adds a simple function that manages symlinks. This is used through the stack of changes to avoid code repetition.
## Context
SwiftPM is very picky in how the header structure must be.
In order to preserve the import/include statements as much as possible when building from source, we can recreate the header structure in a temporary folder inside the react-native package using symlinks.
In this way, users can still modify the headers and build RNTester and HelloWorld using SwiftPM without breaking changes.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D82202860
fbshipit-source-id: 0baa348c84f966a2e1eeb85b008f8e653bffe96c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53876
This is just a couple of small nits after D82836192
Changelog:
[Internal] [Changed] -
Reviewed By: javache
Differential Revision: D82953710
fbshipit-source-id: 1a98c54a110ee1a72225de331bfe2efa4e4225c0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53872
This diff fixes the mismatch between the overflow initial value between the horizontal scroll view component initialization and the React core props instance initial value by applying the same correction as for the vertical scroll view component.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D82919365
fbshipit-source-id: 70e40f56ffa3ea87fa74035c885608f633890610
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53871
The props defined in `YogaStylableProps` define the overflow to be set to `Overflow::Visible` by default.
The scroll view initialized the overflow setting to `Overflow.SCROLL`. This meant that Props 2.0 would only set the overflow prop if it was different from Visible, leading to the scroll view not being configured correctly when asking for the overflow to be visible.
This diff assigns the correct initial value to the scrollview overflow setting only when enabling Props 2.0 to avoid any unexpected behavior changes when not using Props 2.0.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D82919286
fbshipit-source-id: d5368500cc4504164d6fdf7cf60042a9d5792853
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53860
Fixes https://github.com/facebook/react-native/issues/53639
I've realized that our docs and validation logic states that we do support
3x3 matrixes (for 2d transforms). However they're not properly processed
as the values are just copied into a 4x4 matrix.
This can be verified by applying the 3x3 identity matrix on any transform.
I'm fixing it by correctly populating the 4x4 matrix getting the values from the 3x3 matrix in input.
Changelog:
[General] [Fixed] - 9-element (2d) transform matrix are not correctly working
Reviewed By: christophpurrer
Differential Revision: D82836192
fbshipit-source-id: 12029b37ffd8375fff48ea7f9386b849dfe96a62
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53868
This is a prep step to enable better Flow support for react 19 ref-as-prop. While it causes changes in the ReactNativeApi.d.ts snapshot, this diff simply inlines what these `React.ElementRef` evaluates into.
Changelog: [Internal]
Reviewed By: jbrown215
Differential Revision: D82915646
fbshipit-source-id: 64179eac7dde91381361fb9f1053d58100d864c3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53844
Small UI tweaks that help when scanning more visually spread out alert actions on iOS 26.
- Use bold (iOS 26 style) alert title.
- Differentiate "Cancel" actions with red system style.
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D82731784
fbshipit-source-id: 0a0215fc75a4832e742e22328d5e21eee3808972
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53861
Changelog: [Internal]
The issue is a race condition in the React Native Fabric mounting system where `experimental_prefetchResources` is called on a `SurfaceMountingManager` after the surface has been stopped.
1.) `experimental_prefetchResources` is called
2.) Concurrently, `stopSurface()` *can be* called, which sets `mThemedReactContext = null`
3.) `experimental_prefetchResources` then tries to access `mThemedReactContext` via `Assertions.assertNotNull(mThemedReactContext)`
4.) Since `mThemedReactContext` is now `null`, the assertion fails and throws an AssertionError
The fix involves adding a guard to check if the surface is stopped before accessing `mThemedReactContext`
Follows existing patterns used by other methods in the same class
https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java#L201-L213
Reviewed By: lenaic
Differential Revision: D82842572
fbshipit-source-id: 723bad24a075efa219766b0e148080dd42d59fba
Summary:
Extending a tsconfig seems simpler than adding `compilerOptions` with `customConditions`.
### Before
```jsonc
{
"extends": "react-native/typescript-config",
"compilerOptions": {
// ...
"customConditions": ["react-native-strict-api", "react-native"]
}
}
```
### After
```jsonc
{
"extends": "react-native/typescript-config/strict"
// ...
}
```
## Changelog:
[GENERAL] [ADDED] - Add `react-native/typescript-config/strict` export enabling the `react-native-strict-api` custom condition.
Pull Request resolved: https://github.com/facebook/react-native/pull/53564
Test Plan:
### `package.json`
```
{
"name": "react-native-ts-test",
"private": true,
"version": "0.1.0",
"scripts": {
"build": "tsc --noEmit"
},
"devDependencies": {
"react-native/typescript-config": "^0.81.1",
"typescript": "^5.9.2",
"jest": "^30.1.2"
},
"dependencies": {
"react-native": "^0.81.1"
}
}
```
### `tsconfig.json`
```
{
"extends": "react-native/typescript-config/strict",
"include": ["src/index.ts"]
}
```
### `src/index.ts`
```
import { View } from "react-native";
```
Run `npx resolution-explorer` and select "react-native from src/index.ts to node_modules/react-native/types_generated/index.d.ts" to verify the types are resolved correctly.
```
Explicitly specified module resolution kind: 'Bundler'.
Resolving in CJS mode with conditions 'import', 'types', 'react-native-strict-api'.
File '/Users/kraen.hansen/Repositories/react-native-ts-test/src/package.json' does not exist.
Found 'package.json' at '/Users/kraen.hansen/Repositories/react-native-ts-test/package.json'.
Loading module 'react-native' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON.
Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.
Directory '/Users/kraen.hansen/Repositories/react-native-ts-test/src/node_modules' does not exist, skipping all lookups in it.
Found 'package.json' at '/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native/package.json'.
Entering conditional exports.
Matched 'exports' condition 'react-native-strict-api'.
Using 'exports' subpath '.' with target './types_generated/index.d.ts'.
File '/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native/types_generated/index.d.ts' exists - use it as a name resolution result.
'package.json' has a 'peerDependencies' field.
Resolving real path for '/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native', result
'/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native'.
Failed to find peerDependency 'types/react'.
Found 'package.json' at '/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react/package.json'.
Found peerDependency 'react' with '19.1.1' version.
Resolved under condition 'react-native-strict-api'.
Exiting conditional exports.
Resolving real path for '/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native/types_generated/index.d.ts', result
'/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native/types_generated/index.d.ts'.
======== Module name 'react-native' was successfully resolved to
'/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native/types_generated/index.d.ts' with Package ID
'react-native/types_generated/index.d.ts@0.81.1+react@19.1.1'. ========
```
Reviewed By: robhogan
Differential Revision: D82791201
Pulled By: philIip
fbshipit-source-id: f58d3b8fcf3d7f18dd29eef18a3c8c0cb57d1d78
Summary:
Address invalid C++ in-code docs comments to silence few warnings. Ref:
* https://www.doxygen.nl/manual/commands.html#cmdtparam
## 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
-->
[INTERNAL][FIXED] - Address invalid C++ in-code docs comments to silence the warnings.
Pull Request resolved: https://github.com/facebook/react-native/pull/53835
Test Plan: Building RNTester app locally does not output the warnings related to in-code docs comments.
Reviewed By: cortinico
Differential Revision: D82791099
Pulled By: philIip
fbshipit-source-id: 2f93bfd4cd303471b2c52fcdf74871e5dee8c06a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53791
I'm removing parameter to configure new architecture in ReactNativeNewArchitectureFeatureFlagsDefaults because the new architecture is enabled by default everywhere.
changelog: [internal] internal
Reviewed By: cortinico
Differential Revision: D82241552
fbshipit-source-id: 9c5cee4befc914d95b84b01325485923e17ff6da
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53790
New architecture should we enabled by default everywhere, Stable releases should use new arch now
changelog: [internal] internal
Reviewed By: cortinico
Differential Revision: D82241551
fbshipit-source-id: 2a1bf14f2f1da6e441a58b083ca5a55618eec256
Summary:
In Flow 0.284, we will have a stricter version of `Array<T>.includes`. Instead of accepting `mixed`, we will only accept `T` to help catch logical errors. We did the same for `Array.indexOf` and `Array.lastIndexOf` as well.
This diff pre-suppresses newly discovered errors in part of the codebase.
Changelog: [Internal]
Reviewed By: marcoww6
Differential Revision: D82784398
fbshipit-source-id: 6cb11809844f964e0604d33b9f7a3989074cd1cc