Skip to content

Instantly share code, notes, and snippets.

@dhilipkmr
Last active January 26, 2019 19:49
Show Gist options
  • Save dhilipkmr/ce90576259a5b736d92b0dac424ffced to your computer and use it in GitHub Desktop.
Save dhilipkmr/ce90576259a5b736d92b0dac424ffced to your computer and use it in GitHub Desktop.
removing Span
cleanUp = () => {
const initialState = this.initializeState();
this.setState({ ...initialState });
}
callCleanUp = (cleanup, delay) => {
return function() {
clearTimeout(this.bounce);
this.bounce = setTimeout(() => {
cleanup();
}, delay);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment