I have the following code and am trying to create a menu icon that closes and open. I am having issues getting the animation to run in reverse using React.
Here is my code snapshot,
const [reverse, setReverse] = useState(true);
function moveBurger() {
const tl = new gsap.timeline({ paused: true, reversed: reverse });
tl.to('.burger_rect1', 0.2, {
rotation: 45,
transformOrigin: '50% 50%',
})