Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53374
This method was deprecated in React Native 0.79. We should be able to remove it without impact in 0.82.
I also verified that there are no users of this API in OSS.
There is also a 1:1 replacement for this API which is the other non-deprecated getDefaultReactHost() method.
Changelog:
[Android] [Removed] - Remove deprecated DefaultReactHost.getDefaultReactHost() overload - part 2
Reviewed By: mdvacca
Differential Revision: D80623826
fbshipit-source-id: f201e99f7cd437a47919c36eced5637481151822
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53371
This method was deprecated in React Native 0.79. We should be able to remove it without impact in 0.82.
I also verified that there are no users of this API in OSS.
There is also a 1:1 replacement for this API which is the other non-deprecated `getDefaultReactHost()` method.
Changelog:
[Android] [Removed] - Remove deprecated DefaultReactHost.getDefaultReactHost() overload - part 1
Reviewed By: mdvacca
Differential Revision: D80622058
fbshipit-source-id: 4667683be151bc7ef1926a21306e088185695369
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53349
Follows feedback on D78904767, refactoring how we pass data to `PerfMonitorOverlayViewManager` to avoid API additions on `DevSupport`.
New interfaces under `com.facebook.react.devsupport.perfmonitor`:
- `PerfMonitorUpdateListener` is implemented by the view class to receive updates from the C++ `HostTargetDelegate`.
- `PerfMonitorInspectorTargetBinding` exposes an API on `ReactHostInspectorTarget` to send CDP actions down to C++ (stub for now).
- `PerfMonitorDevHelper` allows us to use the internal `ReactHostImplDevHelper` to expose the `ReactHostInspectorTarget` instance from the runtime.
Changelog: [Internal]
Reviewed By: cortinico, rshest
Differential Revision: D80464093
fbshipit-source-id: b88e270c0211e4adf52c015ac700df7f44945a5a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53297
Pivots our display metric for the V2 Perf Monitor experiment by switching to Long Tasks.
- Implements a new "__ReactNative__LongTask" metrics event (note: prefixed, since this sits outside the Web Vitals spec).
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D79556595
fbshipit-source-id: 239cf44884f67bf62295b92e2262ae1811d17e4a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53376
When encountering embedded <Text> components, with the parent <Text> component setting event handlers, culling away the child <Text> components will break the assignment of the event handlers to the text spans on Android.
This diff disables view culling on <Text> components so that event handlers would be correctly assigned to the text fragments once rendered.
Changelog: [Internal]
Reviewed By: andrewdacenko
Differential Revision: D80631997
fbshipit-source-id: f835a249fef1b448b884999ccd75ee06041eca70
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53375
We have seen sufficient internal signal to be confident that we can move this to the experimental release channel. Soon I will publish some experimental documentation and let folks in OSS know about this.
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D80560366
fbshipit-source-id: 6a8cce39f823dfa313c8c51090eb88c31f1f9fd3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53359
A new version of ktfmt broke the OSS CI build for React Native.
That's due to us running still on the older version of ktfmt, as the newer version hasn't been released yet.
I'm temporarly disabling the `ktfmtCheck` jobs because we primarly check formatting from within fbsource.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D80610450
fbshipit-source-id: 846249780f979788356404205d8b8e37fc54a255
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53150
ReactInstanceManager and ReactInstanceManagerBuilder are legacy architecture classes that will be deleted in the future, in this diff we are deprecating them
changelog: [Android][Changed] Deprecate legacy architecture classes ReactInstanceManager and ReactInstanceManagerBuilder, these classes will be deleted in a future release
Reviewed By: mlord93
Differential Revision: D79677828
fbshipit-source-id: 2d79736d94a55e44dd24056985f358e3650ddf6c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53331
Changelog: [internal]
This change was shipped 3 months ago so we can assume the native method will always have this method and don't need to keep backwards compatibility.
Reviewed By: rshest
Differential Revision: D80449031
fbshipit-source-id: 4ff11b81478701ad712b4e097625e569829f6480
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53330
Changelog: [internal]
These methods have been defined for a month, so it's safe to make then non-nullable already.
Reviewed By: GijsWeterings
Differential Revision: D80453413
fbshipit-source-id: 3fde076622dc9d510bad144300364401f2319507
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53318
Changelog: [internal]
This prepares the codebase for an eventual migration of `HostInstance` to `ReactNativeElement`, so the actual migration doesn't need to adjust so much existing code.
Reviewed By: rshest
Differential Revision: D80399739
fbshipit-source-id: 441d3e92ef6dff253343d1058b2027698e8ecb22
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53304
The headers from `react_performance_cdpmetrics` are currently missing in the libreactnative.so prefab.
They're actually references from `Scheduler.h` and this is causing `react-native-screens` to fail compiling
with:
```
In file included from /tmp/RNApp/node_modules/react-native-screens/android/src/main/cpp/NativeProxy.cpp:3:
/home/runner/.gradle/caches/8.14.3/transforms/97716233b9aa00728d9cac038eecaf3d/transformed/react-android-0.82.0-nightly-20250815-41029d8e9-SNAPSHOT-debug/prefab/modules/reactnative/include/react/renderer/scheduler/Scheduler.h:13:10: fatal error: 'react/performance/cdpmetrics/CdpMetricsReporter.h' file not found
13 | #include <react/performance/cdpmetrics/CdpMetricsReporter.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[4/6] Building CXX object CMakeFiles/rnscreens.dir/tmp/RNApp/node_modules/react-native-screens/cpp/RNSScreenRemovalListener.cpp.o
[5/6] Building CXX object CMakeFiles/rnscreens.dir/src/main/cpp/OnLoad.cpp.o
```
See here https://github.com/react-native-community/nightly-tests/actions/runs/16991637594/job/48172255960
I saw this was added on D78904748
Here I'm exposing the headers from `react_performance_cdpmetrics` to the prefab API so users in OSS can
access those headers as well.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D80344762
fbshipit-source-id: 29b09b94370b71a16ecf12d4cca9cd571c588e5c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53339
Changelog: [Internal] - onSizeChanged can be called independent of onLayoutChange. Right now this hasn't affeced anything because VirtualViews are visible by default.
Reviewed By: yungsters
Differential Revision: D80357397
fbshipit-source-id: 06b174791dec0d19da6bbe1a8144d35b93b8f6c1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53189
In addition to the menu button and long pressing fast forward option, adds long pressing back as an option to open DevTools for devices like the Chromecast remote.
Changelog:
[Android][Added] - Add long-press back as an option to open the DevMenu for devices that lack menu & fast-forward.
{F1981060943}
Reviewed By: alanleedev
Differential Revision: D79923779
fbshipit-source-id: b758d591ebe3b8e601dbf704212123451e3c32e1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53336
No longer needed as bridgeless is enabled everywhere.
Changelog:
[iOS][Deprecated] Remove bridge mode title and description from React Native Dev Menu title
Reviewed By: christophpurrer
Differential Revision: D80457504
fbshipit-source-id: bf21e44ed925f4777d0190313c6e4aad774abe42
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53335
No longer needed as bridgeless is enabled everywhere.
Changelog:
[Android][Deprecated] Remove bridge mode string from React Native Dev Menu title
Reviewed By: christophpurrer
Differential Revision: D80457625
fbshipit-source-id: 4cf602a90f29d5495a5e8a4ccaf49abb96e85f94
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52947
Wires up a `landingView` parameter to be passed to rn_fusebox.html that we can use to focus an arbitrary view on launch. Used from the new perf analyze scenario to open devtools on the performance panel.
Changelog:
[Android][Added] - Adds a landing view parameter to opening RNDT, enabling arbitrary view focus on launch.
Reviewed By: hoxyq
Differential Revision: D79329081
fbshipit-source-id: b1513a803f4add803100cebd08f53e59a08e64d4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53319
Changelog: [internal]
We have a microbenchmark for `ReactFabricHostComponent` vs. `ReactNativeElement` but the test code itself is so fast that a big part of its duration is just calling the test function (a noop is 300-500ns, while the duration of these benchmarks is between 800 and 1400ns).
Note that this affects all tests the same way, so the absolute difference in execution time in both tests was still accurate.
This changes how we execute the benchmarks so the test function runs the code under test multiple times and we then report the average of all the runs using the new `overriddenDuration` option.
Before:
| (index) | Task name | Latency avg (ns) | Latency med (ns) | Throughput avg (ops/s) | Throughput med (ops/s) | Samples |
| ------- | -------------------------- | ---------------- | ---------------- | ---------------------- | ---------------------- | ------- |
| 0 | 'noop' | '353.83 ± 0.03%' | '350.00 ± 10.00' | '2856842 ± 0.01%' | '2857143 ± 84034' | 2826221 |
| 1 | 'ReactNativeElement' | '1393.8 ± 1.15%' | '1332.0 ± 20.00' | '745853 ± 0.01%' | '750751 ± 11444' | 717480 |
| 2 | 'ReactFabricHostComponent' | '884.92 ± 0.59%' | '871.00 ± 21.00' | '1144283 ± 0.01%' | '1148106 ± 27029' | 1130046 |
After:
| (index) | Task name | Latency avg (ns) | Latency med (ns) | Throughput avg (ops/s) | Throughput med (ops/s) | Samples |
| ------- | -------------------------- | ---------------- | ---------------- | ---------------------- | ---------------------- | ------- |
| 0 | 'noop' | '400.11 ± 0.30%' | '391.00 ± 10.00' | '2532882 ± 0.07%' | '2557545 ± 67127' | 50000 |
| 1 | 'ReactNativeElement' | '868.04 ± 0.04%' | '859.39 ± 4.41' | '1153974 ± 0.03%' | '1163616 ± 6002' | 50000 |
| 2 | 'ReactFabricHostComponent' | '388.79 ± 0.08%' | '384.18 ± 1.91' | '2579763 ± 0.03%' | '2602947 ± 13006' | 50000 |
Reviewed By: rshest
Differential Revision: D80404122
fbshipit-source-id: 7dc6ad34b2e8aa3cb6d62008f97d1c44e325ab27
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53321
Changelog: [internal]
Just a rename to make it easier to understand.
Reviewed By: rshest
Differential Revision: D80404378
fbshipit-source-id: 3d7e89797be3b92599e07b4b64d2a720756a4f3b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53269
Changelog: [internal]
Just a small refactor of the tests for LogBox to take advantage of the new `document.getElementById` API in RN.
Reviewed By: rshest
Differential Revision: D69528892
fbshipit-source-id: 807f03364e260baa9c3a94cfb1831b7eb24e0d26
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53270
Changelog: [internal]
(Marked as internal because the DOM APIs haven't been released yet).
This implements `getElementById` in the DOM document API.
Reviewed By: rshest
Differential Revision: D69307133
fbshipit-source-id: 0c1454ae42fad92cddc705877b26052e887185bd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53272
Changelog: [internal]
`VirtualView` has been exposed as an unstable API in the `react-native` package but its public API is referencing the DOM APIs, which forces their definitions to also be public (but shouldn't because they haven't been released yet).
This replaces the reference with a reference to `HostInstance`, which will be updated to reference the DOM APIs when ready.
Reviewed By: yungsters
Differential Revision: D80254442
fbshipit-source-id: 254779c97c116ba08b6cc0c185906617ffd1269f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53294
Changelog: [internal]
Just adding a benchmark for `console.timeStamp`, which in normal circumstances will just measure a no-op. We can force installing the inspector and simulate that we're profiling in Fantom to force `console.timeStamp` to go through the tracing paths for the benchmark.
Reviewed By: rshest
Differential Revision: D80272873
fbshipit-source-id: 1e404525bb3390b96fae982c543478a26535a393
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53278
changelog: [internal]
C++ Animated should be in ReactCommon, it is code shared across all platforms.
Reviewed By: christophpurrer, zeyap
Differential Revision: D80261447
fbshipit-source-id: 8ad5d0bb65c9b499b1d9f60fc8babef8d4d90078