@evertbouw/rx-history
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

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);
});

Readme

Keywords

Package Sidebar

Install

npm i @evertbouw/rx-history

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

16 kB

Total Files

15

Last publish

Collaborators

  • evertbouw