Sanity Library Reference Docs
    Preparing search index...

    Variable routeConst

    route: RouteObject = ...

    An object containing functions for creating routers and router scopes. See RouteObject

    const router = route.create({
    path: "/foo",
    children: [
    route.create({
    path: "/bar",
    children: [
    route.create({
    path: "/:baz",
    transform: {
    baz: {
    toState: (id) => ({ id }),
    toPath: (state) => state.id,
    },
    },
    }),
    ],
    }),
    ],
    });