Jump to content
GreenSock

Ishan Shishodiya

Would animations in different react components targetting the same class interfere with each other?

Moderator Tag

Recommended Posts

Suppose I have a section which has a few elements belong to a "circle" class with their own sets of animations defined in a useEffect hook in the very same component itself. Then I have another component with different elements belonging to the "circle" class but with their own set of animations that are different from the first ones defined in their own useEffect hook in the component itself. Would these two animations interfere with each other and also target the animations in the other component or would it be scoped properly?

 

Currently because I am not sure about this I am just using contexts to scope the animations within each component.

Link to comment
Share on other sites

It may help you to read the refs or selectors deep dive on this page

https://greensock.com/react-basics#refs

Shout if that doesn't answer your question, maybe you can pop together a little demo to show us the specifics

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×