Skip to content

Commit 654b75a

Browse files
committed
add note for mixins on es6
1 parent 235b16d commit 654b75a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/Timers.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,6 @@ var Component = React.createClass({
7474
});
7575
```
7676

77-
We strongly discourage using the global `setTimeout(...)` and recommend instead that you use `this.setTimeout(...)` provided by react-timer-mixin. This will eliminate a lot of hard work tracking down bugs, such as crashes caused by timeouts firing after a component has been unmounted.
77+
This will eliminate a lot of hard work tracking down bugs, such as crashes caused by timeouts firing after a component has been unmounted.
78+
79+
However, `TimerMixin` and any other mixins *can not be used on ES6*. You need to use some helper like [react-mixin](https://github.com/brigand/react-mixin) to migarate existing mixins to ES6 classes.

0 commit comments

Comments
 (0)