Jump to content
Search Community

RoyM

Members
  • Posts

    5
  • Joined

  • Last visited

RoyM's Achievements

0

Reputation

  1. That's good advice.. my use case is that I have a complex sequence of animations with nested timelines.. kinda like Siggy's tutorial at https://academy.siggyworks.com/p/web-animation-with-svg-and-greensock and wanted to assert the final state of an svg element. If I could just see an example of how to test the simplest thing, such as that a box is now at 100, 0 (from 0,0).. that would be helpful. My thought is that once you have a complex animation, you should be able to inject/modify the logic and not have to re-run the whole animation to verify your changes, so a way to compress the timeline or mock timers would be needed. thanks
  2. Are there some good examples of testing react hooks with gsap code? I found some older threads on the topic, but got the sense that the Greensock folks seem to prefer the older style (React Classes). Happy to post some examples of my attempts if that helps.
  3. @noviedo - thanks a bunch for that.. I would not have arrived at the idea of a useRef to solve this issue.. works great.
  4. Thanks for that, Zach.. I modified and forked the code as shown here, since my next issue is different than this one. - now my issue is that I'm not able to toggle the "paused" state correctly. It keeps zipping back to the beginning and re-running. Could this be an artifact of using fromTo? https://codesandbox.io/s/busy-hooks-8h5gj?file=/src/DemoApp.css
  5. Hi folks - could someone help me with why the button label doesn't toggle correctly, even though the animation pauses/plays correctly... thanks I'm using react hooks and the demo is in codesandbox, not codepen: https://codesandbox.io/s/dazzling-ives-yztz0?file=/src/App.js
×
×
  • Create New...