1.1.0 • Published 8 years ago

obj-interval v1.1.0

Weekly downloads
2
License
Apache-2
Repository
github
Last release
8 years ago

obj-interval

Object wrapper for setInterval()

Why

It may be useful if you're creating web applications using React.js

let objInterval = require('obj-interval');

let App = React.createClass({
	fetcher: null,
	componentDidMount: function() {
		this.fetcher = new objInterval(() => {
			console.log('Fetching started')
			// AJAX queries
			...
		}, 10000);
	},
	componentWillUnmount: function() {
		this.fetcher.destroy();
	}
})
1.1.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago