Skip to content

Upgrading to 0.26.0 ​

Breaking changes ​

Resolved route titles ​

Replace the resolved route's title promise with getTitle().

ts
// Before
const title = await route.title

// After
const title = await route.getTitle()

Leave and error hook context ​

update is removed from leave and error hook contexts. Use push or replace with an explicit destination when redirecting from these hooks. update remains available in enter and update hooks.

Leave callbacks and error context can now have a null destination when a URL matches no route. Guard access to to before reading its properties.

ts
route.onBeforeRouteLeave((to) => {
  if (to) {
    console.log(to.href)
  }
})

Explicit ErrorHook, ErrorHookContext, and AddErrorHook annotations no longer take a leading route type argument. Prefer callback inference or update their generics to routes and rejections.

See Hooks.

Full release notes.