Skip to content

Commit 396b05e

Browse files
rubennortefacebook-github-bot
authored andcommitted
Remove deprecated InteractionManager (#57026)
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
1 parent a18f53d commit 396b05e

8 files changed

Lines changed: 20 additions & 345 deletions

File tree

packages/eslint-plugin-react-native/utils.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,6 @@ const publicAPIMapping = {
297297
default: 'I18nManager',
298298
types: null,
299299
},
300-
'Libraries/Interaction/InteractionManager': {
301-
default: 'InteractionManager',
302-
types: ['Handle', 'PromiseTask', 'SimpleTask'],
303-
},
304300
'Libraries/Components/Keyboard/Keyboard': {
305301
default: 'Keyboard',
306302
types: [

packages/react-native/Libraries/Interaction/InteractionManager.d.ts

Lines changed: 0 additions & 87 deletions
This file was deleted.

packages/react-native/Libraries/Interaction/InteractionManager.js

Lines changed: 0 additions & 189 deletions
This file was deleted.

0 commit comments

Comments
 (0)