UNPKG

@towns-protocol/react-sdk

Version:

React Hooks for Towns Protocol SDK

23 lines 983 B
import type { SyncAgent } from '@towns-protocol/sdk'; /** * Provides the sync agent to all hooks usage that interacts with the Towns Protocol. * * - If you want to interact with the sync agent directly, you can use the `useSyncAgent` hook. * - If you want to interact with the Towns Protocol using hooks provided by this SDK, you should wrap your App with this provider. * * You can pass an initial sync agent instance to the provider. * This can be useful for persisting authentication. * * @param props - The props for the provider * @returns The provider */ export declare const TownsSyncProvider: (props: { /** A initial sync agent instance. Useful for persisting authentication. */ syncAgent?: SyncAgent; config?: { /** A callback function that is called when the bearer token expires. */ onTokenExpired?: () => void; }; children?: React.ReactNode; }) => import("react").JSX.Element; //# sourceMappingURL=TownsSyncProvider.d.ts.map