0.0.3 • Published 5 years ago

roumuter v0.0.3

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

roumuter

Support push state to history without navigate.

usage

import lib:

import Roumuter from 'roumuter'

create Roumuter store and subscribe

var Roumuter = new Roumuter({
  path: '', // optional
  params: ["sort", "order"] // support object, arrays of string key
})

// subscribe changed
Roumuter.subscribe(params => {
  // => params: {sort: "..", order: ".."}
  // all search query string u define at `params` of Roumuter.
})

navigate

Roumuter.navigate({sort: "Created", order: "ASC"});
// or
Roumuter.navigateTo(path, {sort: "Created", order: "ASC"});

// unsubscribe

Roumuter.unsubscribe();
0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago