Sanity Library Reference Docs
    Preparing search index...

    Interface RouteTransform<T>

    interface RouteTransform<T> {
        toPath: (value: T) => string;
        toState: (value: string) => T;
    }

    Type Parameters

    • T
    Index

    Properties

    Properties

    toPath: (value: T) => string

    Converts a state object to a path string.

    toState: (value: string) => T

    Converts a path string to a state object.