Commit Graph
39506 Commits
Author SHA1 Message Date
Bartlomiej Bloniarz f8564b47fd Move AnimationBackend initialization from Animated (#55103)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55103

This diff decouples AnimationBackend from Animated. Now the backend is intialized in the Scheduler, from where it's passed to UIManager. Animation frontends (such as Animated) can then obtain a reference to the backend, and use it to schedule animation frame updates.

# Changelog
[General] [Changed] - Moved AnimationBackend initiailzation to `Scheduler`
[General] [Added] - `AnimationChoreographer` interface with an implementation for fantom tests

Reviewed By: zeyap

Differential Revision: D89663251

fbshipit-source-id: 428a83d78ef92a89095989fe3121c578cf8d3983
2026-01-20 02:28:23 -08:00
Moti Zilberman 5a70daa80d Extract test fixtures to separate header (#55056)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55056

Refactors InspectorPackagerConnectionTest.cpp to extract the test fixtures into a separate header file. This allows us to split `InspectorPackagerConnectionTest.cpp` into multiple files as we add more test cases, which is particularly helpful for LLMs writing tests.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D90174645

fbshipit-source-id: aa2c2a706391060660adb13a915b57bcea539e2d
2026-01-20 00:22:46 -08:00
Moti Zilberman 211e007522 Add inspector-proxy protocol docs (#55055)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55055

TSIA.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D90174644

fbshipit-source-id: c61eedc70eb2169e14112bd6d48327f5979d8125
2026-01-20 00:22:46 -08:00
Rob Hogan 2d4ee26e57 Sync generated Babel Flow types, yarn-deduplicate (#55233)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55233

X-link: https://github.com/facebook/metro/pull/1640

Re-sync Flow Babel types with the latest version from npm to unbreak no-lockfile CI.

Metro only: Also `yarn-deduplicate` other deps

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D90986684

fbshipit-source-id: 332acd66c2ca1b3396388b383f1c940b19b899ce
2026-01-19 14:15:52 -08:00
Fabrizio Cucci ef10ac0c2e Fix bump of Podfile.lock after release (#55232)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55232

Changelog: [Internal]

As suggested by cipolleschi, this is a more stable solution given that the workflow has been consistently failing for the past couple of RCs.

Reviewed By: cipolleschi

Differential Revision: D90992194

fbshipit-source-id: 7586a4bf141a875b2d780d1a359e79fc42c9ffda
2026-01-19 11:02:54 -08:00
React Native Bot c12806c493 Add changelog for v0.84.0-rc.2 (#55231)
Summary:
Add Changelog for 0.84.0-rc.2

## Changelog:
[Internal] - Add Changelog for 0.84.0-rc.2

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D90989125

Pulled By: fabriziocucci

fbshipit-source-id: 2ba99e097d6622a3df9f0d8a42cd0399ac5a8491
2026-01-19 09:35:03 -08:00
Fabrizio Cucci 3e22873b6d Update View-itest.js for pointerEvents box-only unflattening behavior (#55224)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55224

Changelog: [Internal]

D90772188 changed the behavior of views with `pointerEvents="box-only"` to prevent them from being collapsed/flattened. This is intentional because when `important_for_interaction` is applied on a view with `pointerEvents='box-only'`, the view must remain in the hierarchy to correctly signal to the gaze system that its children are not important for interaction.

The test expected the old behavior where `<View pointerEvents="box-only" />` would be collapsed and render `null`. After the C++ change, views with `pointerEvents="box-only"` now always form a stacking context and are not collapsed.

Updated the test to expect the new behavior where `pointerEvents="box-only"` causes views to unflatten, consistent with how `pointerEvents="none"` behaves.

Reviewed By: rubennorte

Differential Revision: D90984297

fbshipit-source-id: 799e4e26b29126386f4fd8183e2ce0b5cb719f9f
2026-01-19 07:15:35 -08:00
Phil Pluckthun 9f686f2014 Fix regression stopping --project-directory from working (#55204)
Summary:
This is a fix for a regression in https://github.com/facebook/react-native/issues/54948 found by Kudo. Passing an absolute path for `react_native_path` was non-functional before and the change was meant to fix this.

This however used `Pathname.pwd.join(path)` since I assumed that'd be the intention for a relative path. However, my assumption was that `pod install` would only ever be run in the installation root and hence be equivalent to `Pod::Config.instance.installation_root` most of the time.

This broke: `pod install --project-directory ios` (and the likes), since I wasn't aware of the `--project-directory` argument before.

To fix this, we should construct the absolute path and join from `Pod::Config.instance.installation_root` as well.

**Note to self:** Needs a pick into `0.84.0` due to being a regression (will file a pick request after this is merged)

## Changelog:

[IOS] [FIXED] Regression from https://github.com/facebook/react-native/issues/54948 preventing `pod install --project-directory` from working properly

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

Test Plan: - Run `pod install` in `rn-tester` to validate

Reviewed By: vzaidman

Differential Revision: D90870064

Pulled By: cipolleschi

fbshipit-source-id: 4a7bc0320afda29373791f206b31e57ae48b0b8c
2026-01-19 02:46:06 -08:00
Rob Hogan 2e9b7fb2ad Align Flow lib defs for Node.js child_process with v24 (#55186)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55186

This is an AI-assisted change to align the Flow definitions for the `child_process` module with the Node.js docs as at v24.

**New v18+ Features:**

1. **AbortSignal Support** (v18.0.0) - Process cancellation
   - Added `signal?: AbortSignal` option to all async functions (exec, execFile, fork, spawn)
   - Enables cancellation of child processes using `AbortController`
   - Example: `const controller = new AbortController(); spawn('cmd', [], {signal: controller.signal}); controller.abort();`
   - https://nodejs.org/api/child_process.html#child_processexeccommand-options-callback

2. **Enhanced Process Properties** (v20.x)
   - `spawnargs: Array<string>` - Full command-line arguments used to launch the process
   - `spawnfile: string` - Executable file name of the child process
   - `signalCode: string | null` - Signal that terminated the child process
   - https://nodejs.org/api/child_process.html#subprocessspawnargs

**ChildProcess Class Updates:**

3. **Improved Property Types**
   - `stdio` is now a properly typed tuple array with readonly modifier
   - `channel` changed from `Object` to `mixed` for better type safety

4. **Enhanced Method Signatures**
   - `kill(signal?: string | number): boolean` - Now returns boolean and accepts numeric signals
   - `send()` overloads properly typed with `child_process$Serializable` messages
   - `send()` accepts `keepOpen` option: `Readonly<{keepOpen?: boolean}>`
   - https://nodejs.org/api/child_process.html#subprocesskillsignal

**Option Type Improvements:**

6. **Modern Readonly Syntax** - All input options use `Readonly<{...}>`
   - `execOpts`, `execFileOpts`, `forkOpts`, `spawnOpts`, `spawnSyncOpts`, etc.
   - Allows passing readonly types safely

7. **Enhanced Environment Variables**
   - Changed `env?: Object` to `env?: {[key: string]: string | void}`
   - More precise typing for environment variable dictionaries

8. **New Fork Options** (IPC enhancements)
   - `serialization?: 'json' | 'advanced'` - IPC serialization format
   - `killSignal` and `timeout` options added to fork
   - https://nodejs.org/api/child_process.html#child_processforkmodulepath-args-options

9. **Enhanced Spawn Options**
   - Added `killSignal`, `timeout`, `serialization` to `spawnOpts`
   - Better consistency across all spawn functions

**Return Type Fixes:**

10. **spawnRet/spawnSyncRet** - Made fields properly nullable:
    - `status: number | null` - null if process never exited
    - `signal: string | null` - null if not terminated by signal
    - `error: Error | void` - void if no error occurred
    - Removed spread operator for exact types

**Helper Types:**

11. **`child_process$Serializable`** - Union type for IPC messages:
    - `string | number | boolean | bigint | {...} | Array<mixed>`
    - Used in send() method signatures

12. **`child_process$SendHandle`** - Type for handle passing:
    - `net$Server | net$Socket`
    - Used for passing server/socket handles to child processes

**References:**
- Node.js child_process module docs: https://nodejs.org/api/child_process.html
- AbortSignal integration: https://nodejs.org/api/child_process.html#child_processexeccommand-options-callback

Changelog: [Internal]
 ---
> Generated by [Confucius Code Assist (CCA)](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/)
[Confucius Session](https://www.internalfb.com/confucius?host=devvm45708.cln0.facebook.com&port=8086&tab=Chat&session_id=1a3aa26e-e5a9-11f0-8d47-71a4a90f0494&entry_name=Code+Assist), [Trace](https://www.internalfb.com/confucius?session_id=1a3aa26e-e5a9-11f0-8d47-71a4a90f0494&tab=Trace)

Reviewed By: vzaidman

Differential Revision: D89944331

fbshipit-source-id: 744ae04051c2214d97269c48c115060f5f30fb1f
2026-01-18 12:52:52 -08:00
petar.marinov 9353eb55b8 - Fix fontVariant stylistic sets being ignored in New Architecture (#55183)
Summary:
During an upgrade of ReactNative and switching to new arch, we noticed that Android is ignoring *some* fontVariants. Specifically `stylistic-{num}`. Digging further I noticed that there are `stylistic-{num}` mappings added to `fromRawValue` (in `packages/react-native/ReactCommon/react/renderer/attributedstring/conversions.h`), but are not included for `toMapBuffer`

## 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] [Fixed] - fontVariants `stylistic-{num}` not being propagated correctly

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

Test Plan:
- Added a new free font (FiraCode) that has stylistic features.
- Added Text examples for Android showing with and without stylistic features

Before and after in order:

<img width="1080" height="2400" alt="Before" src="https://github.com/user-attachments/assets/3d21a992-f36a-4ffe-a1b2-8da40b3ee399" />

<img width="1080" height="2400" alt="After" src="https://github.com/user-attachments/assets/f4ee208a-3f98-42d9-b8c2-5b122d2db383" />

Reviewed By: cortinico

Differential Revision: D90830140

Pulled By: philIip

fbshipit-source-id: 42dbb98641274c0d4c01c501662b2ae59e21927d
2026-01-17 20:14:38 -08:00
Marco Wang 97c9202400 Deploy 0.297.0 to xplat (#55218)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55218

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D90924627

fbshipit-source-id: a5eee1f919162c648c43b0408d82845e45b6d336
2026-01-17 16:28:34 -08:00
Marco Wang 23aa4ddbac Transform another round of xplat (#55217)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55217

tsia

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D90914123

fbshipit-source-id: dc28b22524d3c6e6487d28cad30cc53a92ea8b83
2026-01-17 14:56:15 -08:00
Johan Kasperi d9ee4bb0aa Add scrollsChildToFocus prop to ScrollView to control automatic scrolling when a child receives focus (#55143)
Summary:
This PR adds a new Android-specific boolean property `scrollsChildToFocus` to the ScrollView component.

When a focusable element inside a ScrollView receives focus (e.g., a TextInput is tapped), Android's default behavior is to automatically scroll the ScrollView to bring that element into view. While this is often desirable, there are cases where developers need more control over scroll behavior - for example, when implementing custom scroll-to-focus animations, when using virtualized lists that manage their own scroll positions, or when focus changes should not disturb the current scroll position.

Setting `scrollsChildToFocus={false}` disables this automatic scrolling behavior, giving developers full control over scroll positioning when focus changes.

**Related issues:**
- https://github.com/facebook/react-native/issues/33419
- https://github.com/LegendApp/legend-list/issues/377

## Changelog:

[ANDROID] [ADDED] - Add `scrollsChildToFocus` prop to ScrollView to control automatic scrolling when a child receives focus

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

Test Plan:
1. Run the RN Tester app on Android
2. Navigate to ScrollView examples
3. Find the new "scrollsChildToFocus" example in the Android-specific section
4. With `scrollsChildToFocus: true` (default):
   - Tap on a TextInput that is partially visible
   - Observe that the ScrollView automatically scrolls to bring the TextInput into view
5. Toggle `scrollsChildToFocus` to `false`:
   - Tap on a TextInput that is partially visible
   - Observe that the ScrollView does NOT automatically scroll - the focus changes but scroll position remains unchanged

This property affects both vertical (`<ScrollView />`) and horizontal (`<ScrollView horizontal={true} />`) scroll views.

Reviewed By: javache

Differential Revision: D90831796

Pulled By: philIip

fbshipit-source-id: 31193b45127bbac4b984452e2b56211a46616c8b
2026-01-17 13:28:32 -08:00
Marco Wang 3f56ac08ba Fix react-native-github/packages/react-native-codegen/e2e/deep_imports/__test_fixtures__
Summary:
codemoded.

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D90895159

fbshipit-source-id: 6753b0552f5543870ffd8bfae8ee1332e506f55f
2026-01-16 16:48:52 -08:00
Marco Wang 0d64cf2e98 Fix react-native-github/packages/react-native-codegen/e2e/namespaced/__test_fixtures__/
Summary:
codemoded

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D90895199

fbshipit-source-id: b3c06e081b5c94ceed1a0de66c334d0ba4132119
2026-01-16 16:36:50 -08:00
Devan Buggay 87d3a19735 Compile out more unsupported UIKit APIs (#55213)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55213

Compiling out some various unsupported UIKit APIs.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D90825451

fbshipit-source-id: ee88cc3937c5e17540a2951b39a354f297dd3c41
2026-01-16 13:54:04 -08:00
Devan Buggay 7b0dbc1a66 Get RCTPushNotificationManager compiling for AppleTV (#55214)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55214

Some various `removeDeliveredNotifications` APIs aren't supported on AppleTV, no-oping.

https://developer.apple.com/documentation/usernotifications/unusernotificationcenter/removedeliverednotifications(withidentifiers:)?language=objc

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D90825526

fbshipit-source-id: f494ce4c3eadf812b84434f835a50a1383adbfd8
2026-01-16 13:54:04 -08:00
Devan Buggay 808882c52b Add tvOS to various @available version directives (#55199)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55199

A few places `available` is missing tvOS, adding to fix the build.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D90712192

fbshipit-source-id: ca4c15c1aa47176290a7b33f4480ecd9b9935b67
2026-01-16 13:54:04 -08:00
Devan Buggay 3bc9a5cacb Stub unsupported components for AppleTV (#55198)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55198

UISwitch, UIRefreshControl, UIKeyboardNotifications ,and UIPasteBoard are unavailable on AppleTV
https://developer.apple.com/documentation/uikit/uiswitch?language=objc
https://developer.apple.com/documentation/uikit/uirefreshcontrol?language=objc
https://developer.apple.com/documentation/uikit/uiresponder/keyboardwillshownotification?language=objc
https://developer.apple.com/documentation/uikit/uipasteboard?language=objc

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D90712066

fbshipit-source-id: 045836f14e650c655ae669bf5e3bb7fcf693efd3
2026-01-16 13:54:04 -08:00
Devan Buggay 1165c07c24 Log/redbox compiling for AppleTV (#55197)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55197

Platform guarding some unavailable UIKit APIs.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D90711498

fbshipit-source-id: af29087e91d3983a2a95db3633ad0f1ca9b3c16d
2026-01-16 13:54:04 -08:00
Devan Buggay b8392ad84d Remove Surface Handlers for AppleTV (#55196)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55196

SurfaceTouch and SurfacePointer handlers use a lot of unsupported UIKit APIs. Instead of granuarly wrapping the UIKit usage, this minimally removes the handlers from AppleTV all-together, as they no-op anyways (there is no click-through support on simulator.)

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D90704270

fbshipit-source-id: 83d0c2f6f0efec3f9a46d5bcfc4a83f6765574cd
2026-01-16 13:54:04 -08:00
Peter Abbondanzo ef9bab2a15 Make ReactSwipeRefreshLayout extendable (#55192)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55192

Making `ReactSwipeRefreshLayout` open so one can subclass with a custom implementation

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D90789479

fbshipit-source-id: 6b8d7212140170a73e71a1eb529d8d3fffc098e3
2026-01-16 10:35:19 -08:00
Zeya Peng 30fd0c4ac8 Log error when unsupported type is passed to interpolation outputRange (#55209)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55209

## Changelog:

[Android] [Changed] - Log error when unsupported type is passed to interpolation outputRange

Add error logging when unsupported value types (like PlatformColor) are passed to interpolation outputRange. This prevents a ClassCastException crash by detecting non-Number types and logging an error instead.

Reviewed By: javache

Differential Revision: D90863942

fbshipit-source-id: d6a3b2dbde859ae86a1bc4a5dfcc33a9ee369dd1
2026-01-16 09:26:28 -08:00
Peter Abbondanzo 95bac85b5a Always enable nested scrolling for swipe refresh layouts (#55189)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55189

If nested scrolling is not enabled by default for ScrollView that define a `RefreshControl`, the wrapping Android view `ReactSwipeRefreshLayout` will swallow and discard non-touch scroll actions, like joystick movements. This change updates the default to be true, a more-sane default, which aligns with the existing touch actions that are always allowed. This does not impact touch-based behavior at all.

Changelog: [Android][Changed] Updated the `nestedScrollEnabled` prop to default to true if the ScrollView defines a `refreshControl`

Reviewed By: javache

Differential Revision: D90778643

fbshipit-source-id: 37693e80fc7c8b3461dc3d5cad51690e0ff77a77
2026-01-16 09:15:16 -08:00
Fabrizio Cucci 0649717a3d Prevent view collapsing when pointerEvents is 'box-only' (#55185)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55185

Changelog: [Internal]

This change ensures that views with `pointerEvents` set to `'box-only'` are not collapsed, preserving the parent-children relationship in the view hierarchy.

This is necessary because when `important_for_interaction` is applied on a view with `pointerEvents='box-only'`, the view must remain in the hierarchy to correctly signal to the gaze system that its children are not important for interaction. Without this fix, the view could be collapsed during flattening, breaking the propagation of the `important_for_interaction` property to descendant views.

Reviewed By: javache

Differential Revision: D90772188

fbshipit-source-id: 6a6a408845ebd1f86e420f5309160e7a6b3a9715
2026-01-16 08:38:46 -08:00
Peter Abbondanzo 03b1bf608d Back out "Forward ACTION_SCROLL events to SwipeRefreshLayout children" (#55194)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55194

Reverts https://github.com/facebook/react-native/pull/55097
Original Phabricator Diff: D90209679

Reverting this behavior and feature flag as the experiment that used it is no longer needed

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D90791564

fbshipit-source-id: 362399c435a0c5addba5734e333bc2c1747f7293
2026-01-16 08:32:55 -08:00
Jakub Piasecki 1c63877fec Explicitly enable debugger when building Hermes for Fantom (#55202)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55202

Changelog: [Internal]

After changing Hermes V1 to be the default engine, Fantom tests started failing. This was due to a combination of changes, one of them being the change of default value for `HERMES_ENABLE_DEBUGGER`. In case of legacy Hermes it was enabled by default, while for Hermes V1 it's disabled by default.

Fantom didn't explicitly set this flag, but the debug build of RN (which Fantom performs) requires it to be enabled. This diff explicitly sets this flag to true for Fantom builds.

Reviewed By: cipolleschi, cortinico

Differential Revision: D90849881

fbshipit-source-id: 17f8393872eacef26f927f50aaf364644d9b94d7
2026-01-16 06:42:34 -08:00
Jakub Piasecki 58f9141aec Propagate Hermes V1 opt-in to Fantom (#55157)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55157

Changelog: [Internal]

At the moment, Fantom doesn't propagate the Hermes V1 opt-in to the React Native build, which causes the code that should be gated by compile-time flags to be compiled. Since Hermes V1 differs in some cases, the headers there are missing.

This diff adds the opt-in propagation, so the code can be correctly compiled out.

Reviewed By: cortinico

Differential Revision: D90674696

fbshipit-source-id: d2adb131af4588e745c023703a893d0ecaaaee01
2026-01-16 06:42:34 -08:00
Pieter De Baets 0999637218 Cleanup useShadowNodeStateOnClone flag (#55033)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55033

This has been fully rolled out now, the feature flag can be removed.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D90106435

fbshipit-source-id: 0ddb5b93cc33f6fa3099ca14a3961f2b8a6344e6
2026-01-16 06:26:05 -08:00
D N 9d3cc383ba chore: Clear timer functions do noting when a timer does not exist (#55126)
Summary:
Issue: https://github.com/facebook/react-native/issues/55104

## Changelog:

[GENERAL] [CHANGED] - `cancelAnimationFrame`, `clearImmediate`, `clearTimeout` and  `clearInterval` do nothing If there is no callback associated the given handle

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

Test Plan:
The next code should not throw any errors (runtime and TS)

```tsx
  const id1 = requestAnimationFrame(()=> {});
  cancelAnimationFrame(id1);
  cancelAnimationFrame(id1); // clear twice the same id
  cancelAnimationFrame(-1);
  cancelAnimationFrame(null);
  cancelAnimationFrame(undefined);

  const id2 = setImmediate(()=> {});
  clearImmediate(id2);
  clearImmediate(id2); // clear twice the same id
  clearImmediate(-1);
  clearImmediate(null);
  clearImmediate(undefined);

  const id3 = setTimeout(()=> {}, 1000);
  clearTimeout(id3);
  clearTimeout(id3); // clear twice the same id
  clearTimeout(-1);
  clearTimeout(null);
  clearTimeout(undefined);

  const id4 = setInterval(()=> {}, 1000);
  clearInterval(id4);
  clearInterval(id4); // clear twice the same id
  clearInterval(-1);
  clearInterval(null);
  clearInterval(undefined);
```

Reviewed By: cortinico

Differential Revision: D90615301

Pulled By: philIip

fbshipit-source-id: e5102a137bac6492d0f89bb02ef11eeca9977a9b
2026-01-15 18:14:46 -08:00
Marco Wang cd3a9c55c1 Transform all remaining utility types (#55178)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55178

We are transforming the following utility types to be more consistent with typescript and better AI integration:

* `$NonMaybeType` -> `NonNullable`
* `$ReadOnly` -> `Readonly`
* `$ReadOnlyArray` -> `ReadonlyArray`
* `$ReadOnlyMap` -> `ReadonlyMap`
* `$ReadOnlySet` -> `ReadonlySet`
* `$Keys` -> `keyof`
* `$Values` -> `Values`
* `mixed` -> `unknown`

See details in https://fb.workplace.com/groups/flowlang/permalink/1837907750148213/.

drop-conflicts

Command:

`js1 flow-runner codemod flow/transformUtilityType --format-files=false --legacy-type='ALL'`

Reviewed By: SamChou19815

Differential Revision: D90728908

fbshipit-source-id: a8a1a06eb274cc32b12e893679aa92034eb962c4
2026-01-15 16:02:51 -08:00
Tim Yung 5ab418460b RN: Remove Special Case for "Warning: " Errors (#55193)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55193

React no longer emits the "Warning: " prefix from error messages, so we no longer need special handling for error messages with this prefix.

If third party call sites are depending on `console.error('Warning: …')` being treated as a warning, they should be migrated to use `console.warn('…')`.

Changelog:
[General][Changed] - Logs created by `console.error` that begin with "Warning: " will no longer be treated as warnings. These call sites should migrate to using `console.warn` instead.

Reviewed By: javache, robhogan

Differential Revision: D90795590

fbshipit-source-id: 1b51ab63fd02cead4da33c64040c88aac50abbfb
2026-01-15 15:35:34 -08:00
Tim Yung f7cd8c4c1c RN: Export EventEmitter in Public API (#55190)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55190

Makes `EventEmitter` (and the related `IEventEmitter` interface type) available as part of React Native's Public API.

This allows product logic using React Native to also leverage the same abstraction. Currently, code outside of React Native that wants to use `EventEmitter` must resort to deep imports (which is discouraged).

Changelog:
[General][Added] - Added `EventEmitter` to `react-native` exports.

Reviewed By: huntie

Differential Revision: D90786781

fbshipit-source-id: ad06124c96fcba35b8b5fc8170bfb15c17884a0a
2026-01-15 14:09:26 -08:00
Tim Yung 6241e619d7 RN: Minor Cleanup in EventEmitter (#55191)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55191

Removes an obsolete `$FlowFixMe` and removes an unused type argument.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D90785969

fbshipit-source-id: 549554ce0bd0401273a92dd5b13fb3da420dae95
2026-01-15 14:09:26 -08:00
Marco Wang 60f9bfd546 Transform mixed to unknown (#55176)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55176

We are transforming the following utility types to be more consistent with typescript and better AI integration:

* `$NonMaybeType` -> `NonNullable`
* `$ReadOnly` -> `Readonly`
* `$ReadOnlyArray` -> `ReadonlyArray`
* `$ReadOnlyMap` -> `ReadonlyMap`
* `$ReadOnlySet` -> `ReadonlySet`
* `$Keys` -> `keyof`
* `$Values` -> `Values`
* `mixed` -> `unknown`

See details in https://fb.workplace.com/groups/flowlang/permalink/1837907750148213/.

drop-conflicts

Command:

`js1 flow-runner codemod flow/transformUtilityType --format-files=false --legacy-type='$ReadOnlyArray'`

Reviewed By: SamChou19815

Differential Revision: D90728808

fbshipit-source-id: 2b2fb7f24140e25638af4c73648b81021cc85339
2026-01-15 11:29:11 -08:00
Fabrizio Cucci cf124f63e6 Make ImportantForInteractionHelper internal and move to views.view package (#55181)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55181

Changelog: [Internal]

This change makes `ImportantForInteractionHelper` internal to avoid exposing it as part of the public API. The class is moved from `com.facebook.react.uimanager` to `com.facebook.react.views.view` package since it's only used by `ReactViewGroup` and `ReactViewManager` within that package.

This reduces the public API surface of ReactAndroid and keeps implementation details private.

Reviewed By: cortinico

Differential Revision: D90767295

fbshipit-source-id: 0c763f20330c516c0647c92c8bd53320865a1f63
2026-01-15 10:42:47 -08:00
Rubén Norte 61671717d4 Add missing include for animated backend (#55180)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55180

Changelog: [internal]

Fantom tests are currently failing because the binary is failing to compile because `AnimatedPropsBuilder` isn't defined in `NativeAnimatedNodesManager`. This fixes that.

Reviewed By: zeyap

Differential Revision: D90762526

fbshipit-source-id: bd4d24b872fa554b08af9c8ea6b1b65a505d525a
2026-01-15 07:30:57 -08:00
Pieter De Baets 660a636816 Update eslint-plugin-react to 7.37.5 (#55163)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55163

Changelog: [Internal]

Reviewed By: fabriziocucci

Differential Revision: D90601852

fbshipit-source-id: 6d71b299529cdbbb7ae72f26d50228bd4e165de0
2026-01-15 03:57:35 -08:00
Riccardo Cipolleschi 4fb33022bc Bump Hermes version to 250829098.0.6 (#55164)
Summary:
We released Hermes V1 250829098.0.6 and this change aligns React Native to that version

## Changelog:
[General][Changed] - Make React Native consume 250829098.0.6

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

Test Plan: GHA

Reviewed By: cipolleschi

Differential Revision: D90710397

Pulled By: philIip

fbshipit-source-id: 4502301c2f25165d5cd4d4294f8da0c60d48ba73
2026-01-15 02:26:36 -08:00
Jakub Piasecki d1fb556968 Remove scripts/cxx-api (#55162)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55162

Changelog: [Internal]

Removes `scripts/cxx-api`, containing the legacy C++ API tracking code.

Reviewed By: cortinico

Differential Revision: D90675176

fbshipit-source-id: ed920f3e19a302f8451bcc0c2a827c99570d6cb8
2026-01-15 00:33:52 -08:00
George Zahariev 3fb0a6f611 Update prettier-plugin-hermes-parser in fbsource to 0.33.2 (#55173)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55173

Bump prettier-plugin-hermes-parser to 0.33.2.

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D90708822

fbshipit-source-id: 1075c891a9ccccc4d8fbffe827f9f13a016ed94f
2026-01-14 19:24:58 -08:00
Fabrizio Cucci caa1fb6a09 Add ImportantForInteractionHelper for interaction handling (#55168)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55168

Changelog: [Internal]

This diff introduces `ImportantForInteractionHelper`, a helper class that manages the `important_for_interaction` view tag. This tag determines how a view participates in interaction handling based on its `pointerEvents` value.

The helper provides a mapping from `PointerEvents` to `important_for_interaction` values:
- `AUTO` → `YES` (0x1)
- `NONE` → `NO | EXCLUDE_DESCENDANTS` (0x2 | 0x8)
- `BOX_ONLY` → `YES | EXCLUDE_DESCENDANTS` (0x1 | 0x8)
- `BOX_NONE` → `NO` (0x2)

This allows interaction detection systems to understand which views should participate in interaction handling based on their pointer events configuration, which is useful for features like Gaze-based interaction in accessibility and UI harvesting.

See design doc: https://docs.google.com/document/d/15Fi47zOHQh--KFWLUxQAUmBENgnZ0ZkYsKyOshPzBAo/edit?tab=t.0#heading=h.61xuoxksjdrp

Changes:
- Added `ImportantForInteractionHelper.kt` with constants and `setImportantForInteraction()` method
- Added `important_for_interaction` tag ID to `ids.xml`
- Updated `ReactViewManager.setPointerEvents()` to set the tag when pointer events change
- Updated `ReactViewGroup.initView()` to set the default tag value based on initial `PointerEvents.AUTO`
- Updated `BaseViewManager.prepareToRecycleView()` to clear the tag when recycling views

Reviewed By: javache, mdvacca

Differential Revision: D90386675

fbshipit-source-id: f0dab0111f2f5d14d5cb17769578804e2ddcbfe9
2026-01-14 15:08:10 -08:00
Alex Hunt f1bedfb92b Bump packages for next release (#55172)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55172

Follows the recent `0.84-stable` branch cut.

Changelog: [Internal] - Bump all packages to `0.85.0-main`

Reviewed By: vzaidman

Differential Revision: D90698490

fbshipit-source-id: b81b840bfd66e631f160a11c4c64baa6850e3393
2026-01-14 12:17:16 -08:00
React Native Bot fcede03a16 Add changelog for v0.84.0-rc.1 (#55170)
Summary:
Add Changelog for 0.84.0-rc.1

## Changelog:
[Internal] - Add Changelog for 0.84.0-rc.1

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

Test Plan: N/A

Reviewed By: alanleedev

Differential Revision: D90697473

Pulled By: huntie

fbshipit-source-id: a4f6dd5c0ece486c69a362a293668375d9773611
2026-01-14 10:56:04 -08:00
Nicola Corti 8f4e29b920 main - Correctly apply substitution for HERMES_V1_VERSION_NAME (#55159)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55159

This is a cherry-pick of
https://github.com/facebook/react-native/commit/bdcd17324062cd35337d0ac8d5e4282658e1f89f
which is already on 0.84-stable, on main

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D90674701

fbshipit-source-id: b882e4b90e76dfd230658d6e662c091eab4ab8f6
2026-01-14 10:53:22 -08:00
Rob Hogan c9c601d61a Node.js: Drop support for Node.js versions released before 20.19.4, and EOL v21,v23 (#55114)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55114

Our official [docs](https://reactnative.dev/docs/set-up-your-environment#node--watchman) require:

> Node 20.19.4 or newer

Currently, our `package.json#engines` fields express this as `"node": ">= 20.19.4"`

This is a bit imprecise because of Node's overlapping release lines - e.g. v24.0.0 is actually older than v20.19.4 (2025-07-15), and the whole v21 line was already EOL before v20.19.4.

The release *date* is relevant because Node.js frequently backports the most important updates - notably, `require(esm)` is already stable in Node 20.19 but is not unflagged in v22 until v22.12.

This makes the `package.json#engines` requirement truer to the documented requirement, dropping some old minors and EOL majors that prevent us using features included in v20.19.

Notably, `require(esm)` is stable and unflagged on all versions supported from this diff.

 - v21 and v23 are EOL, so are dropped.
 - v22.13 pre-dates 20.19.4 and is the first to have unflagged silent `require(esm)`
 - v24.3.0 pre-dates 20.19.4 and is the first to unflag TS-stripping
 - Support v25 and newer.

Changelog:
[General][Breaking] Drop support for EOL Node.js lines and old minors.

Reviewed By: cortinico, huntie

Differential Revision: D90467358

fbshipit-source-id: a5fdfb1b93a9d6cffe78eb6811ff7420ab906f44
2026-01-14 10:49:05 -08:00
Phil Pluckthun 33641f09fa Resolve use_react_native!(path) param in react_native_pods.rb from Pathname.pwd (#54948)
Summary:
> [!NOTE]
> This is a bit of a speculative fix that's based on trying to get a bare project with `react-native-macos` to link directly against it in an isolated installation, which makes passing `path` set to `require.resolve('react-native-macos/package.json')` more convenient than constructing a relative path first.

The `path` argument in `react_native_pods.rb` is not resolved but instead later joined using `File.join(relative_path_from_current, path)`. This doesn't actually resolve the path, meaning, if `path` is absolute it's appended to this first relative path.

Instead, we should use `Pathname#join` and join the path to the pathname, guaranteeing it to be absolute, then construct relative paths (for the prefix) using `relative_path_from` against the installation root.

If we don't do this, the absolute path gets treated as a relative path (e.g. `./Users`), which leads to errors such as:
> [!] Invalid Podfile file: Couldn't find the React Native package.json file at ./Users/phil/git/expo/expo-pnpm/packages/expo/package.json.

Since absolute paths are unambiguous the change should be safe.

## Changelog:

[IOS][Fixed] - Allow absolute react-native paths to be passed to `use_react_native!` in project podfiles

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

Test Plan:
This can be replicated by replacing `path` in the `use_react_native` call with an absolute resolution and running `pod install` after, for example:

```rb
    use_react_native!(
      :path => File.dirname(`node --print "require.resolve('react-native/package.json')"`),
      :hermes_enabled => podfile_properties['expo.jsEngine'] == nil || podfile_properties['expo.jsEngine'] == 'hermes',
      # An absolute path to your application root.
      :app_path => "#{Pod::Config.instance.installation_root}/..",
    )
```

Usually, the `path` argument gets resolved from the react-native-config via `config[:reactNativePath]`. However, this makes the implicit assumption that `use_native_modules!` has already converted this to a relative path.

Reviewed By: cortinico, vzaidman

Differential Revision: D90261384

Pulled By: cipolleschi

fbshipit-source-id: fb7482a2f5adb8452a1c300d7a26b22129e4171a
2026-01-14 10:43:20 -08:00
Ryan Frawley 3b46755b3b fix rctimage observer crash when unloading with events in-flight (#55135)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55135

Resolves a rare native iOS ImageResponseObserverCoordinator crash that would result from a use-after-free in the observer.

## Changelog:

[iOS] [Fixed] - Resolves a rare race-condition that can trigger in RCTImageComponentView.

## Original Error
EXC_BAD_ACCESS / KERN_INVALID_ADDRESS in ImageResponseObserverCoordinator::nativeImageResponseProgress

Reviewed By: fkgozali, javache

Differential Revision: D90552795

fbshipit-source-id: 30f62b151664161c408667d27c7bb6b69ee2bd67
2026-01-14 10:30:51 -08:00
Peter Abbondanzo 77779f83b7 Forward ACTION_SCROLL events to SwipeRefreshLayout children (#55097)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55097

This change adds support for joystick and scrollwheel input devices to trigger pull-to-refresh in SwipeRefreshLayout.

Previously, `ACTION_SCROLL` events from non-touch input devices (joysticks, scrollwheels, etc.) were not being forwarded to child views wrapped in a SwipeRefreshLayout. This prevented child ScrollViews from receiving these events and handling pull-to-refresh gestures via nested scrolling.

The fix overrides `dispatchGenericMotionEvent` in ReactSwipeRefreshLayout to explicitly forward `ACTION_SCROLL` events to the first child view before falling back to the default behavior. This allows child views to process the scroll events and communicate with the SwipeRefreshLayout parent through the standard nested scrolling APIs.

Changelog: [Internal]

Reviewed By: mdvacca, javache

Differential Revision: D90209679

fbshipit-source-id: 48ce2f961b8bfe548f3b29f073ab99b1da19915d
2026-01-14 10:28:40 -08:00
Nicola Corti adde658b30 main - Correctly bump hermes-compiler to V1 version
Summary:
This is a cherry pick of
https://github.com/facebook/react-native/commit/7d901032a0b6a92c52293650a3ada9e2f9b696c9
which is currently on the 0.84 release branch on main.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D90674702

fbshipit-source-id: 516a51c0fdd7cbb78f89f5e7d626430f4b2ee4ba
2026-01-14 09:20:47 -08:00