Jump to content
Search Community

_Sorin_

Business
  • Posts

    4
  • Joined

  • Last visited

Everything posted by _Sorin_

  1. Thanks for the replies, guys! I will definitely try the useGSAP() hook. I was convinced that this is not a GSAP issue in any way; I was just trying to do a brainstorming here. And it helped. I found the issue in my code. I was creating the animation in my React component outside of the useEffect() hook. Now it's working properly. Thanks for your quick responses 💪!
  2. Hi there! I'm facing an odd situation when using GSAP in a Parcel project. The animation seems to work fine for the first time I load it, but for any subsequent refreshes of the page the CSS of the target element are not updating, although the tween itself is running ok. This has something to do with the Parcel Cache. I tried starting the project with --no-cache flag but the behavior remains the same. If I'm changing the content of the <h1> that I'm animating between refreshes, the animation is playing fine (for the first time). Any ideas of workarounds? P.S. here is the code import React from "react"; import { gsap } from "gsap"; export const App = () => { gsap.fromTo( "#h1", { color: "red" }, { color: "blue", duration: 2 } ); return <h1 id="h1">Hello world 12343</h1>; };
  3. ? so clean and simple! It makes perfect sense to use the same <path> instance every time. Thanks for the clarifications. Happy&excited to be part of the club! You guys are doing an amazing job!
  4. Hi there, I'm trying to animate the title of the selected section at onClick event. (when I'm at menu HOME and click on ABOUT, I want the text to morph from HOME to ABOUT; when I click on HOME I want the text to morph to HOME ) Not sure how to approach this (more precisely, I don't know what am I doing wrong in my example). In this example there are only 2 menu items but I want to be able to use this code for websites with 5-6 menus; I considered the possibility of creating every combination possible (navigating from each menu to each menu, so basically having the morphSVG animations created beforehand) but I wanted to know if there is a way of creating the timeline dynamically.
×
×
  • Create New...