Upgrading to 0.28.0
Breaking changes
Removed view options
The component and components options and the second createRoute props argument are removed. These were deprecated in 0.25.0.
Use one addView call per component. Put props in that view's props option, and supply name for named views.
ts
const user = createRoute({
name: 'user',
path: '/users/[id]',
})
.addView(UserPage, {
props: (route) => ({ userId: route.params.id }),
})Follow the before/after migration for both single and named views. See Views for current options.
View props types
CreateRouteProps, PropsGetter, RouterViewPropsGetter, and PropsCallbackContext are removed with the legacy view options. Infer the props callback through addView, or use its public AddViewPropsGetter and AddViewPropsCallbackContext types where an annotation is needed.