var Dot = React.createClass({ mixins: [ChartAnimationMixin], radius: 10, getInitialState: function() { return {}; }, componentWillReceiveProps: function(newProps) { this.setState({ lastY: this.props.y || newProps.y }, this.animateAll); }, animateAll: function() { this.clearAnimations(this.refs.dot); this.animate(this.refs.dot, 'cy', this.state.lastY, this.props.y); }, render: function() { return ( {this.props.value} ); } });