Skip to content

A GSAP plugin for tweening React.js component state.

License

Notifications You must be signed in to change notification settings

ash-vd/gsap-react-plugin

 
 

Repository files navigation

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

About

A GSAP plugin for tweening React.js component state.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CoffeeScript 78.8%
  • JavaScript 13.5%
  • HTML 7.7%