DEV Community


Discussion on: Animating React: GreenSock and React Hooks

gilbertmizrahi profile image

Great article.
I have one question. Suppose you want to pass parameters dynamically to the tl timeline, how would you do that?

coffeecraftcode profile image
Christina Gorton Author

Do you have an example? Typically if I am adding some kind of parameter I create a function for my TL and pass in parameters there. For example this is an animation I eventually used in a Vue app. If you go down to the startConfetti function you will see I used element and then passed in the elements I wanted to animate in the actually main timeline.

Is that the kind of thing you are asking?