ConstThis context is defined in @sanity/sdk-react and provided by the Studio.
The Studio imports it from this package and wraps its component tree:
import {SDKStudioContext} from '@sanity/sdk-react'
function StudioRoot({children}) {
const workspace = useWorkspace()
return (
<SDKStudioContext.Provider value={workspace}>
{children}
</SDKStudioContext.Provider>
)
}
When SanityApp is rendered inside this provider, it auto-configures
without any config prop:
<SanityApp fallback={<Loading />}>
<MyComponent />
</SanityApp>
React context that allows the SDK to auto-detect when it is running inside a Sanity Studio. The Studio provides a workspace handle via this context, and
SanityAppreads it to deriveprojectId,dataset, and a reactive auth token — eliminating the need for manual configuration.