tracked-history

0.1.0 • Public • Published

NPM Package

Tracked History

BrowserHistory tracks browser history so that we can restore history stack with snapshots.

It was originally created for Boring Router to support complete lifecycle hooks while keeping browser navigation behavior right.

MemoryHistory and ReadOnlyHistory are also available for testing or server-side usages.

Installation

npm install tracked-history

Usage

import {BrowserHistory} from 'tracked-history';

const history = new BrowserHistory();

const snapshot = history.snapshot;

void history.push('/about');

void history.restore(snapshot);

License

MIT License.

Readme

Keywords

none

Package Sidebar

Install

npm i tracked-history

Weekly Downloads

2

Version

0.1.0

License

MIT

Unpacked Size

60.8 kB

Total Files

23

Last publish

Collaborators

  • vilicvane