Forum

Interaction Manager in react native

This thread contains 1 reply, has 2 voices, and was last updated by Chirag Sawhney 4 years, 5 months ago.

  • Author Replies
    • #63650

      What is the Interaction Manager and how is it used? Why is it important?


    • #63651

      The InteractionManager is the native module responsible for deferring the execution of a function until an “interaction” has finished. We can call InteractionManager.run After Interactions(() => {…}) to handle this deferral. We can also register our own interactions.

      InteractionManager is very important because React Native has two threads. There is a JavaScript UI thread which handles drawing updates to the screen, and another thread used for all tasks not on the UI thread.

      Since there is only one thread for making UI updates, it can get overloaded and drop frames, especially during things like navigation screen animations. We use the InteractionManager to ensure that our function is executed after these animations occur so that we do not drop frames on the UI thread. Trying to draw a new screen while it is being animated is often too much for the thread to handle.

       


Viewing 1 reply thread

You must be to reply to this thread.Please or . Registration is 100% free.

GET FREE CONSULTATION

Call Us Now For Free Consultation97370 05566

Our experts listen to you patiently and suggest you the right course after conducting a personality profile test. Register your interest below to schedule personality profile test for you.

SUBSCRIBE TO OUR NEWSLETTER

Copyright 2016-2024 Smart Mentors. All Rights Reserved.

Login

FORGOT PASSWORD

Sign up now to Become An Instructor

    Register your Interest

      cf7captchaRegenerate Captcha