Sanity Library Reference Docs
    Preparing search index...

    Interface RouteObject

    Interface for the route object.

    interface RouteObject {
        create: (
            routeOrOpts: string | RouteNodeOptions,
            childrenOrOpts?: RouteNodeOptions | RouteChildren,
            children?: Router | RouteChildren,
        ) => Router;
        intents: (base: string) => Router;
        scope(
            scopeName: string,
            routeOrOpts: string | RouteNodeOptions,
            childrenOrOpts?: RouteNodeOptions | RouteChildren,
            children?: Router | RouteChildren,
        ): Router;
    }
    Index

    Methods

    Properties

    Methods

    Properties

    create: (
        routeOrOpts: string | RouteNodeOptions,
        childrenOrOpts?: RouteNodeOptions | RouteChildren,
        children?: Router | RouteChildren,
    ) => Router

    Creates a new router. Returns Router See RouteNodeOptions and RouteChildren

    intents: (base: string) => Router

    Creates a new router for handling intents. Returns Router