Gsap With React.js
Solution 1:
You should read a bit about react before using it
https://reactjs.org/tutorial/tutorial.html#what-is-react
but answering your question, first you don't need to use jquery
How to add scroll event in react component
this.state should only contain "state" the state of the view, things that are used in the render function, everytime you call setState the view will be re-rendered so you can use setState to change the style, in your case looks like you need to change the style based on timeLineMax, you should grab the value that you wanna change from timeLineMax and use setState of this particular value you shouldn't save tl on the state.
just one more thing javascript uses camelCase for functions not snake_case
Solution 2:
If someone is looking to do something like this today, with GSAP 3 and state hooks, here is a working example on github:
Post a Comment for "Gsap With React.js"