Jump to content
Search Community

React and GSAP error

harp test
Moderator Tag

Recommended Posts

Error:
Uncaught TypeError: Cannot add property _gsap, object is not extensible

 

import React{ useRefuseEffect } from 'react';
import { gsap } from "gsap";
 
function Loading() {
 
  // Store a reference of needed dom elements
  const loadingHeading = useRef();
 
  // wait until DOM has been rendered
  useEffect(() => {
    gsap.from(loadingHeading{ opacity: 0 })
  })
 
  return (
    <>
      <section className="loading">
        <div className="loading__content">
          <h1 ref={loadingHeadingclassName="loading__heading heading--xl color--dark-grey mb-60">
            La Camicia
          </h1>
          <p className="para--lg color--mid-grey">
            An elegant <span className="font--italic">Shirt Configurator</span> prototype created by Harpreet Singh.
          </p>
          <p className="para--lg color--mid-grey">
            Thank you for visiting. Hope you enjoy it.
          </p>
        </div>
      </section> 
    </>
  )
}
 
export default Loading;
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...