2.0.0 • Published 5 years ago

@sebastbake/add-history-listener v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

This package provides a simple api to subscribe to browser history events. It's the window.

size downloads npm GitHub

add-history-listener

This package provides a simple API to subscribe to browser history events.

const cleanup = addHistoryListener((prev, next) => {
  console.log(next);
});

history.replaceState(42, undefined, "/somewhere#over-the-rainbow");
// Prints { state: 42, pathname: "/somewhere", hash: "#over-the-rainbow", ...other useful things}
2.0.0

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.0

5 years ago