Last active
January 26, 2019 19:49
-
-
Save dhilipkmr/ce90576259a5b736d92b0dac424ffced to your computer and use it in GitHub Desktop.
removing Span
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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