1.1.1 • Published 6 years ago

@evertbouw/rx-history v1.1.1

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

fromHistory

Create an Observable from a History object.

import { createBrowserHistory } from "history";
import { fromHistory } from "@evertbouw/rx-history";

const history = createBrowserHistory();
const location$ = fromHistory(history);

location$.subscribe(([location, action]) => {
  console.log("Path change!", location.pathname, action);
});