@threadplane/reactFunctionv0.0.0

useAgent

Unpublished development API. This package is under development and is not available as a published release.

Observe an app-owned session. Unmount releases only this subscription.

import { useAgent } from '@threadplane/react';

Declaration · overload 1

export declare function useAgent<TSnapshot>(session: {
    getSnapshot(): TSnapshot;
    subscribe(notify: () => void): () => void;
}): TSnapshot;

Type parameters

TSnapshot

Parameters

session · required
{ getSnapshot(): TSnapshot; subscribe(notify: () => void): () => void; }

Returns

TSnapshot