SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 154 C++

Remove deprecated InteractionManager (#57026)

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

`InteractionManager` has been marked as deprecated and has emitted a runtime warning on first access for several releases. Remove it from the public API.

Accessing `InteractionManager` from `react-native` now throws a `__DEV__` invariant with a migration message pointing at `requestIdleCallback`, mirroring the pattern already used for other previously-removed legacy modules.

The recommended migration is to refactor long tasks into smaller chunks and use `requestIdleCallback` / `cancelIdleCallback` instead of `runAfterInteractions` / `handle.cancel()`.

Changes:
- Remove the lazy getter from `index.js` and replace it with a `__DEV__` invariant stub.
- Remove the `Handle`, `PromiseTask`, `SimpleTask` type re-exports and the `InteractionManager` default re-export from `index.js.flow`.
- Delete `Libraries/Interaction/InteractionManager.js` and its `.d.ts`. The parent `Libraries/Interaction/` directory is kept — `PanResponder`, `TouchHistoryMath`, and `FrameRateLogger` continue to live there.

Changelog:
[General][Removed] - Remove deprecated `InteractionManager` (use `requestIdleCallback` instead)

Reviewed By: huntie

Differential Revision: D106640958

fbshipit-source-id: 01a15fa46b9c840473d96ae9d4ab8b4da4699352
R
Rubén Norte committed
ed893f7d98053eb47f6ea757b5a917de6c37a58f
Parent: dc9043e
Committed by meta-codesync[bot] <215208954+meta-codesync[bot]@users.noreply.github.com> on 6/1/2026, 8:07:54 PM