In the browser
The browser plugin will automatically update your browser URL and state on route changes. It will also listen to popstate events (triggered by back and forward buttons and manual URL changes).
It adds a bunch of functions to work with full URLs:
router.matchUrl(url). It also decorates the start function so you don't have to supply any start path (it extracts it from the current URL).
import browserPlugin from 'router5-plugin-browser'
const router = createRouter()
forceDeactivate: default to
canDeactivatehandlers won't get called on popstate events. It is not recommended to set it to
base: the base of your application (the part to add / preserve between your domain and your route paths).
preserveHash: whether to preserve the initial hash value on page load (default to
true, only if
mergeState: whether to keep any value added in history state by a 3rd party or not (default to