Skip to content

Commit 62f0750

Browse files
committed
react 0.14 support
1 parent 6e521e8 commit 62f0750

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

index.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var Counter = React.createClass({
1616
if (this.stop) return;
1717

1818
raf(this.animate);
19-
this.draw()
19+
this.draw();
2020
},
2121

2222
draw: function() {
@@ -28,7 +28,7 @@ var Counter = React.createClass({
2828
var easing = this.props.easing;
2929

3030
easing = easing && easing in ease ? easing : 'outCube';
31-
var now = Date.now()
31+
var now = Date.now();
3232
if (now - this.start >= time) this.stop = true;
3333
var percentage = (now - this.start) / time;
3434
percentage = percentage > 1 ? 1 : percentage;
@@ -39,7 +39,11 @@ var Counter = React.createClass({
3939
},
4040

4141
render: function() {
42-
return React.DOM.span({ className: 'counter' }, Math.round(this.state.value));
42+
return (
43+
<span className='counter'>
44+
{Math.round(this.state.value)}
45+
</span>
46+
);
4347
}
4448
});
4549

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
"raf": "^2.0.4"
2525
},
2626
"peerDependencies": {
27-
"react": ">= 0.12"
27+
"react": "^0.14.0"
2828
}
2929
}

0 commit comments

Comments
 (0)