hzdg / gsap-react-plugin

A GSAP plugin for tweening React.js component state.
Other
130 stars 8 forks source link

Tween mixin #5

Open matthewwithanm opened 10 years ago

matthewwithanm commented 10 years ago

This addresses GH-4.

An alternative idea for cleaning up tweens would be to catch errors when calling setState and silently kill the tweens on them. (This has some negative troubleshooting and potentially performance implications.)

Checking isMounted doesn't seem to work because (I think) we want to allow the state of unmounted components to be changed if they are mounting. There doesn't seem to be a way to check that directly (i.e. without a mixin), however.