Skip to content

Upgrading to 0.32.0 ​

Breaking changes ​

Route hook return values ​

Route hook registration now returns the route for chaining instead of a removal function. Replace saved removal functions with the registration's signal option or remove from the callback context.

ts
// Before
const remove = route.onBeforeRouteEnter(callback)
remove()

// After
const controller = new AbortController()
route.onBeforeRouteEnter(callback, { signal: controller.signal })
controller.abort()

Router and component hook registration still return removal functions. See Removing Hooks.

Param input types ​

Rename Param input annotations to ParamOptions and ParamGetSet to ParamGetSetOptions. Param now represents a created definition returned by param factories.

ts
// Before
import type { Param, ParamGetSet } from '@kitbag/router'

// After
import type { ParamOptions, ParamGetSetOptions } from '@kitbag/router'

See Custom Param Types.

Full release notes.