Migrating from 1.x to 2.x
New features
Breaking change
Code example
import Router5, { loggerPlugin } from 'router5';
import historyPlugin from 'router5-history';
import listenersPlugin from 'router5-listeners';
const router = new Router5()
.add([{
name: 'home',
path: '/home'
}])
.usePlugin(historyPlugin())
.usePlugin(listenersPlugin())
// Development helper
.usePlugin(loggerPlugin())
.start();Last updated