A simple middleware-style router for isomorphic JavaScript web apps
uniqueRouteNameSep
option to generateUrls(router, options)
to allow non-unique route names among different branches of nested routes and access them by uniquely generated name (#194)router.resolve()
and context.next()
always return a promise now (#187)context.keys
(BREAKING CHANGE)generateUrls
compatible with UniversalRouterSync
(#172)context.next()
to throw Route not found
instead of TypeError
(#169)Migration from v6 to v7:
error.context
or error.code
you still can access them using errorHandler
option:
errorHandler(error, context) {
const code = error.status || 500
console.log(error, context, code)
}