Sanity Library Reference Docs
    Preparing search index...

    Function useSchema

    • React hook that returns the schema registry for the current project

      Returns Schema

      The schema registry for the current project

      function MyComponent() {
      const schema = useSchema()
      // ... do something with the schema ...
      }