Update index.html
'current' makes more sense than 'start' as the value increments passed it's start value.
Tony Spiro committed
Mar 27, 2015 at 15:17 UTC
03e0ebf5320aa72701e3fb6576b4e1980dda1d63
1 file changed
+3
-3
examples/transitions/index.html
+3
-3
@@ -35,7 +35,7 @@
35
36
var AnimateDemo = React.createClass({
37
getInitialState: function() {
38
- return {start: 0};
38
+ return {current: 0};
39
},
40
41
componentDidMount: function() {
@@ -47,14 +47,14 @@
47
},
48
49
tick: function() {
50
- this.setState({start: this.state.start + 1});
50
+ this.setState({current: this.state.current + 1});
51
},
52
53
render: function() {
54
var children = [];
55
var pos = 0;
56
var colors = ['red', 'gray', 'blue'];
57
- for (var i = this.state.start; i < this.state.start + 3; i++) {
57
+ for (var i = this.state.current; i < this.state.current + 3; i++) {
58
var style = {
59
left: pos * 128,
60
background: colors[i % 3]