Upgrading to 0.13.3
Breaking changes
Default prefetch strategy
Enabled prefetching now defaults to lazy, waiting until the link is visible. Set prefetch: 'eager' where you need the previous immediate behavior. To preserve the default selection of assets while changing timing, configure components explicitly:
const router = createRouter(routes, {
prefetch: { components: 'eager' },
})See Prefetching.
Props callback context
abort is removed from props callback types; it was not supported there. Move navigation guards that abort to a before hook. See Hooks.
Removed exports
The component wrapper helper is no longer exported. Put the component and its props callback directly in the route options for this release:
const user = createRoute({
name: 'user',
path: '/users/[id]',
component: UserPage,
props: (route) => ({ userId: route.params.id }),
})Props move again in 0.16.0 and 0.25.0.
ComponentProps, ParamWithDefault, and isParamWithDefault are also no longer exported. Infer values from your component or param definition and use withDefault to construct defaults.
routerInjectionKey, routerRejectionKey, and useRejection are no longer exported. Use useRouter for the installed router rather than importing its injection key. There is no public rejection-state composable in this release; keep rejection-specific display logic in the component configured for that rejection. useRejection is exported again in 0.22.2.