Sanity Library Reference Docs
    Preparing search index...

    Function RouteScope

    • A component that wraps a scoped router context, so that calls to useRouter(), useRouterState(), and usage of <StateLink /> will be prefixed with the scope segment.

      Parameters

      Returns Element

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