Created
November 17, 2015 20:32
-
-
Save slavikshen/093254b532a95531a28b to your computer and use it in GitHub Desktop.
A faster alternative to forceUpdate.
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
var QuickUpdateMixin = { | |
getInitialState: function() { | |
return { | |
_updateTicker: 0 | |
}; | |
}, | |
quickUpdate: function() { | |
this.setState({ | |
_updateTicker: this.state._updateTicker++ | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment