What is InteractionManager and how is it used?

Technology CommunityCategory: React NativeWhat is InteractionManager and how is it used?
VietMX Staff asked 3 years ago
  • The InteractionManager is a native module that allows long-running work to be scheduled after any interactions/animations have completed. In particular, this allows JavaScript animations to run smoothly.
  • To schedule the tasks
    	```jsx
    	InteractionManager.runAfterInteractions(()  =>  {
    		// ...long-running synchronous task...  
    	});
    	```
  • InteractionManager also allows applications to register animations by creating an interaction ‘handle’ on animation start, and clearing it upon completion