The library would be much easier to use with Typescript if it was possible to use it as a super class. E.g.,
import {GSAPComponent} from "react-gsap-enhancer"
class MyComponent extends GSAPComponent {
componentDidMount(prevProps, prevState) {
super.componentDidMount(prevProps, prevState)
this.myController = this.addAnimation(...)
}
render() {
// I understand that the enhancer render function needs to add refs, so
// perhaps the API can be something like this:
super.render(() => {
// the usual render function business..
return <div... />
})
}
}
The library would be much easier to use with Typescript if it was possible to use it as a super class. E.g.,