GSAP'ers, I'm trying to understand what I'm missing with a simple use case. I managed getting an example I found to work but when trying out something different out, I see no animations. Here is my simple ReactJS and GSAP test.
Package versions: gsap": "1.20.4", "react": "16.2.0"
Viewing the console, there are no errors. I do see "onStart" and "onComplete" printed. But no animation.
import React, { Component } from 'react';
import {TweenLite, Linear} from 'gsap';
export default class TextExample extends Component {
animate = () => {
TweenLite.to(this.titleElement, 2, {text:this.props.endTitle, ease:Linear.easeNone})
.eventCallback("onStart", () => {console.log("onStart");})
.eventCallback("onComplete", () => {console.log("onComplete");});
}
render() {
return (
<div id="myId"
ref={elm => this.titleElement = elm}
onClick={this.animate}>
{this.props.startTitle}
</div>
)
}
}