You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a few different Scenes constructed using their own Timelines and 1 master Timeline taking care of sequencing the different scenes. Every scene may or may not use a forwardRef markup as showcased in the Advanced Multiple Targets section. It looks something like this:
This issue has to do with me currying props into forwardRef components. The manual control just completely breaks the sequence. However, when I use the provided Controls wrapper, all is fine. Makes me think that the curried forwardRef is not the issue per se. New CodeSandbox example: uncomment both the Control tags to see what is happening.
The text was updated successfully, but these errors were encountered:
The problem is that the target change with every rerender. You can prevent this by using a useMemo hook:
constCurriedForwardedTimelineTargetMarkup: React.ForwardRefExoticComponent<React.RefAttributes<any>>=useMemo(()=>CurriedForwardedTimelineTarget({ text }),[text]);
I'll mark this issue as enhancement and try to make it work with changing targets.
I have a few different Scenes constructed using their own Timelines and 1 master Timeline taking care of sequencing the different scenes. Every scene may or may not use a
forwardRef
markup as showcased in the Advanced Multiple Targets section. It looks something like this:This issue has to do with me currying props into
forwardRef
components. The manual control just completely breaks the sequence. However, when I use the providedControls
wrapper, all is fine. Makes me think that the curried forwardRef is not the issue per se. New CodeSandbox example: uncomment both theControl
tags to see what is happening.The text was updated successfully, but these errors were encountered: