Jump to content
Search Community

Element not found: #page>canvas

ashik test
Moderator Tag

Recommended Posts

I don't use React myself but have you read the following post, there are some great tips in there about how to use GSAP with React. I

 

couldn't get your codepen to work, the formatting isn't correct. It is stating SyntaxError: Unexpected token '<' line 189. Maybe the StackBlitz template is better to use seeing that you are using React (link to template). Hope it helps and happy tweening! 

 

 

Link to comment
Share on other sites

Hi,

 

Your example is not working because the imports are not pointed to files that actually exists (they rely on having the npm packages installed which is not available in codepen) and a relative path to a CSS file.

 

Please fork this example to create a demo:
https://stackblitz.com/edit/gsap-react-basic-f48716

 

Also we strongly recommend using GSAP Context (as mentioned on the resources in the page @mvaneijgen linked) in React setups, especially the scope utility that could come in handy on this case.

 

Hopefully this helps.

Happy Tweening!

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.
×
×
  • Create New...