Jump to content


  • Posts

  • Joined

  • Last visited

Blog Post Comments posted by nickraps

  1. @OSUblake


    Thanks for the explanation! 

    I see your point. I agree if you create the timeline in the component function, it should be always in a hook like useState or useRef to prevent creating new ones.


    However, what if you just create the timeline as a plain variable in the same file as the component, but not in the actual component function? That way, a new timeline also won't be created even if the component re-renders. I guess in this particular case it also works.