Skip to content

Commit a7d5bd9

Browse files
committed
add note for mixins on es6
i#Update Timers.md
1 parent 235b16d commit a7d5bd9

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+
Keep in mind that if you use ES6 classes for your React components [there is no built-in API for mixins](https://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html#mixins). To use `TimerMixin` with ES6 classes, we recommend [react-mixin](https://github.com/brigand/react-mixin).

0 commit comments

Comments
 (0)