Sanity Library Reference Docs
    Preparing search index...

    Variable getClientStateConst

    getClientState: BoundStoreAction<
        ClientState,
        [options: ClientOptions],
        StateSource<SanityClient$1>,
    > = ...

    Returns a state source for the Sanity client instance.

    This function provides a subscribable state source that emits updated client instances whenever relevant configurations change (such as authentication tokens). In an OAuth app the client follows token changes itself, so none is emitted for them. Use this when you need to react to client configuration changes in your application.