Skip to content

Remove deprecated InteractionManager (#57026)#57026

Closed
rubennorte wants to merge 1 commit into
react:mainfrom
rubennorte:export-D106640958
Closed

Remove deprecated InteractionManager (#57026)#57026
rubennorte wants to merge 1 commit into
react:mainfrom
rubennorte:export-D106640958

Conversation

@rubennorte

@rubennorte rubennorte commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary:

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

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 1, 2026
@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels Jun 1, 2026
@meta-codesync

meta-codesync Bot commented Jun 1, 2026

Copy link
Copy Markdown

@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D106640958.

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

Warning

JavaScript API change detected

This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API.

  • Please include a clear changelog message.
  • This change will be subject to additional review.

This change was flagged as: BREAKING

@meta-codesync meta-codesync Bot changed the title Remove deprecated InteractionManager Remove deprecated InteractionManager (#57026) Jun 1, 2026
rubennorte added a commit to rubennorte/react-native that referenced this pull request Jun 1, 2026
Summary:

`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
@rubennorte rubennorte force-pushed the export-D106640958 branch from b4fcc7d to eac0008 Compare June 1, 2026 15:09
Summary:

`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
@rubennorte rubennorte force-pushed the export-D106640958 branch from eac0008 to 396b05e Compare June 1, 2026 15:45
@meta-codesync meta-codesync Bot closed this in ed893f7 Jun 1, 2026
@facebook-github-tools facebook-github-tools Bot added the Merged This PR has been merged. label Jun 1, 2026
@meta-codesync

meta-codesync Bot commented Jun 1, 2026

Copy link
Copy Markdown

This pull request has been merged in ed893f7.

@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @rubennorte in ed893f7

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants