Jump to content
Search Community

React and GSAP

martis test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hm, it doesn't look like you loaded/imported the TextPlugin (which is required for the "text" tween). 

 

import TextPlugin from "gsap/TextPlugin";

 

Does that resolve things? If you're still having trouble, please provide a reduced test case, perhaps using https://codesandbox.io/ and we'd be happy to help (though I'm no React expert). 

Link to comment
Share on other sites

Zomg it worked Jack. This makes me very happy. Ok, so you handed me a fish. The question now becomes, how do I fish these import answers for myself? Is there documentation on what to import for a given operation?

 

import React, { Component } from 'react';
import {TweenLite, Linear} from 'gsap';
import TextPlugin from "gsap/TextPlugin";  // This worked! 

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...