5.0.3 • Published 7 years ago
react-timers v5.0.3
react-timers
A react setInterval
/setTimeout
mixin for mere mortals.
Any intervals that are set are automatically cleared based on the component life cycle.
WARNING: If you are performing an async action, you should still check if the component is mounted.
Example
var Timers = require('react-timers')
module.exports = React.createClass({
mixins: [Timers],
componentDidMount: function () {
var self = this
this.setTimeout(function () {
self.setState({ lastUpdated: new Date() })
}, 1000)
this.setInterval(function () {
self.setState({ lastUpdated: new Date() })
}, 1000)
},
render: function () {
// ... etc
}
})
LICENSE MIT
5.0.3
7 years ago
5.0.2
7 years ago
5.0.1
7 years ago
5.0.0
9 years ago
4.0.6
9 years ago
4.0.5
9 years ago
3.4.3
9 years ago
4.0.4
9 years ago
4.0.3
9 years ago
3.4.2
9 years ago
4.0.2
9 years ago
3.4.1
9 years ago
4.0.1
9 years ago
4.0.0
9 years ago
3.4.0
9 years ago
3.3.1
9 years ago
3.3.0
9 years ago
3.2.0
9 years ago
3.1.2
9 years ago
3.1.0
9 years ago
3.0.0
9 years ago
2.0.0
9 years ago