Skip to content

Instantly share code, notes, and snippets.

@such
Created November 20, 2020 16:34
Show Gist options
  • Save such/e95490d4b458df6a66cb6e4d2eb613aa to your computer and use it in GitHub Desktop.
Save such/e95490d4b458df6a66cb6e4d2eb613aa to your computer and use it in GitHub Desktop.
setTimer = () => {
const { interval } = this.props;
this.clearTimer();
if (!Moment.pooledTimer && interval !== 0) {
this.timer = setInterval(() => {
this.update(this.props);
}, interval);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment