Commit eac0008
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: D1066409581 parent a18f53d commit eac0008
7 files changed
Lines changed: 20 additions & 340 deletions
File tree
- packages
- eslint-plugin-react-native
- react-native
- Libraries/Interaction
- types
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | 300 | | |
305 | 301 | | |
306 | 302 | | |
| |||
Lines changed: 0 additions & 87 deletions
This file was deleted.
Lines changed: 0 additions & 189 deletions
This file was deleted.
0 commit comments