MobX charged history
NPM package + other utilities
Documentaion is here
import { reaction } from "mobx"
import {
createQueryParams,
createBrowserHistory,
createHashHistory,
createMemoryHistory,
} from "mobx-location-history";
const history = createBrowserHistory();
// const history = createHashHistory();
// const history = createMemoryHistory();
const queryParams = createQueryParams({ history });
reaction(() => history.location, location => {
// do things
})
history.push('/home')
queryParams.set({
foo: 11,
bar: 'kek',
willBeRemoved: undefined,
})
history.destroy();
Want to contribute ? Follow this guide