Remove deprecated InteractionManager (#57026)#57026
Closed
rubennorte wants to merge 1 commit into
Closed
Conversation
|
@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D106640958. |
|
Warning JavaScript API change detected This PR commits an update to
This change was flagged as: |
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
b4fcc7d to
eac0008
Compare
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
eac0008 to
396b05e
Compare
|
This pull request has been merged in ed893f7. |
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? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
InteractionManagerhas been marked as deprecated and has emitted a runtime warning on first access for several releases. Remove it from the public API.Accessing
InteractionManagerfromreact-nativenow throws a__DEV__invariant with a migration message pointing atrequestIdleCallback, 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/cancelIdleCallbackinstead ofrunAfterInteractions/handle.cancel().Changes:
index.jsand replace it with a__DEV__invariant stub.Handle,PromiseTask,SimpleTasktype re-exports and theInteractionManagerdefault re-export fromindex.js.flow.Libraries/Interaction/InteractionManager.jsand its.d.ts. The parentLibraries/Interaction/directory is kept —PanResponder,TouchHistoryMath, andFrameRateLoggercontinue to live there.Changelog:
[General][Removed] - Remove deprecated
InteractionManager(userequestIdleCallbackinstead)Reviewed By: huntie
Differential Revision: D106640958