Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

gsap-react-plugin

hzdg44MIT1.0.2

A GSAP plugin for tweening React.js component state.

Greensock, GSAP, TweenLite, TweenMax, React, plugin

readme

GSAP React Plugin

A GSAP plugin for tweening React.js component state.

This plugin will handle tweening values on a prop called state. If the tween target does not have a setState method, the plugin will not initialize.

Usage

React.createClass({
    getInitialState: function() {
        return {width: 0};
    },
    componentDidMount: function() {
        TweenLite.to(this, 1, {state: {width: 100}});
    },
    render: function() {
        return <div style={{width: this.state.width}}>Hello World!</div>
    }
});

Installation