mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
RN: Deprecate InteractionManager (#53832)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53832 Deprecates `InteractionManager` by adding a warning when it is imported. Changelog: [General][Changed] - InteractionManager has been deprecated and no longer respects interaction handles. Instead, it is now recommended to avoid executing long-running JavaScript tasks by breaking them up into smaller tasks and scheduling them using `requestIdleCallback()`. Reviewed By: javache Differential Revision: D82704809 fbshipit-source-id: 99474cd7949abfe323c366b9ab8d8fc195578395
This commit is contained in:
Vendored
+6
@@ -224,6 +224,12 @@ module.exports = {
|
||||
* @deprecated
|
||||
*/
|
||||
get InteractionManager() {
|
||||
warnOnce(
|
||||
'interaction-manager-deprecated',
|
||||
'InteractionManager has been deprecated and will be removed in a ' +
|
||||
'future release. Please refactor long tasks into smaller ones, and ' +
|
||||
" use 'requestIdleCallback' instead.",
|
||||
);
|
||||
return require('./Libraries/Interaction/InteractionManager').default;
|
||||
},
|
||||
get Keyboard() {
|
||||
|
||||
Reference in New Issue
Block a user