import React, { Component, RefObject, createRef } from 'react';
import { render } from 'react-dom';
import './style.css';
import { TweenLite } from "gsap";
interface AppProps {}
interface AppState {}
class App extends Component<AppProps, AppState> {
constructor(props) {
super(props);
this.box = null;
}
box: HTMLDivElement;
componentDidMount() {
TweenLite.to(this.box, 1, {yPercent:100, repeat:-1, yoyo:true});
}
render() {
return (
<div>
<h1>GSAP & React, with typescript sample</h1>
<div className="box"
ref={e => this.box = e}
></div>
</div>
);
}
}
render(<App />, document.getElementById('root'));