jxy Posted October 20, 2021 Share Posted October 20, 2021 The installation page is confusing to me . And I can hardly find how to install "CustomEase" for React. All the links are circular and unclear. https://greensock.com/docs/v3/Installation Link to comment Share on other sites More sharing options...
Solution OSUblake Posted October 20, 2021 Solution Share Posted October 20, 2021 Welcome to the forums @jxy What's barely working? And what can be done to make it better? CustomEase is a bonus to all registered users, as explained on the CustomEase FAQ, so you need to download the files from the installation page. React users include GSAP in a variety of different ways, but I'm going to assume you want the npm method. Please check out this video at around 2:50, it explains it better than I can in a forum post... 1 Link to comment Share on other sites More sharing options...
jxy Posted October 22, 2021 Author Share Posted October 22, 2021 Hi, thank you for your reply! I have successfully installed customEase and I can see it in my node_modules folder. How to import CustomEase into my React project then? Like I said the installation page isn't working. It shows the same (wrong) import code whatever modules I check on. Link to comment Share on other sites More sharing options...
OSUblake Posted October 22, 2021 Share Posted October 22, 2021 Hey @jxy That's very strange. What browser/OS are you seeing that in? And do you see any errors in the console? It's working perfectly fine for me... So you would import like this... import { gsap } from "gsap"; import { CustomEase } from "gsap/CustomEase"; gsap.registerPlugin(CustomEase); Unless you are using next.js, which doesn't support ES Modules at the moment, so you would have to import the UMD files. import { gsap } from "gsap/dist/gsap"; import { CustomEase } from "gsap/dist/CustomEase"; gsap.registerPlugin(CustomEase); 2 Link to comment Share on other sites More sharing options...
jxy Posted October 23, 2021 Author Share Posted October 23, 2021 Hi @OSUblake I am on Chrome/Mac. Here's the console message. The webpage worked in Incognito mode though, not sure what blocked it in regular mode. Yes, i am using Nextjs! Thanks for your tip! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now