Skip to content

Upgrading to 0.16.0 ​

Breaking changes ​

Route props ​

Move the props option out of the route options and into the second argument to createRoute.

ts
// Before
const user = createRoute({
  name: 'user',
  path: '/users/[id]',
  component: UserPage,
  props: (route) => ({ userId: route.params.id }),
})

// After
const user = createRoute({
  name: 'user',
  path: '/users/[id]',
  component: UserPage,
}, (route) => ({ userId: route.params.id }))

For named views, the second argument is an object of props getters keyed by view name. This syntax is later deprecated in 0.25.0 and removed in 0.28.0. See Component Props for current usage.

Full release notes.