Skip to content

Instantly share code, notes, and snippets.

@jeswin
Last active February 9, 2019 11:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeswin/876eadd02efa1509068f42f52c3fc25c to your computer and use it in GitHub Desktop.
Save jeswin/876eadd02efa1509068f42f52c3fc25c to your computer and use it in GitHub Desktop.
router-article-click-handler
function createClickHandler(url) {
return ev => {
history.pushState({}, undefined, url);
storePathInState(url.split("/").slice(1));
ev.preventDefault();
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment