Last active
April 11, 2016 21:41
-
-
Save emilong/55148d814039ee9e4201527ae7cf8e42 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Make sure not to bind this function before passing it as onUpdate | |
// to Router below since it will be called with this set to the Router | |
// instance. | |
function onLocationChange() { | |
doSomethingInterestingWithPath(this.state.location.pathname); | |
} | |
... | |
<Router routes={routes} onUpdate={onLocationChange} /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment