Sanity Library Reference Docs
    Preparing search index...

    Variable StateLinkConst

    StateLink: ForwardRefExoticComponent<
        Omit<StateLinkProps & Omit<HTMLProps<HTMLAnchorElement>, "href">, "ref"> & RefAttributes<
            HTMLAnchorElement,
        >,
    > = ...

    A component that creates a link that updates the URL state.

    This component uses the useStateLink hook to create a link that updates the URL state.

    Props to pass to the StateLink component. See StateLinkProps.

    function MyComponent() {
    return <StateLink state={{foo: 'bar'}}>Link</StateLink>
    }