UNPKG

@macalinao/grill

Version:

Modern Solana development kit for React applications with automatic account batching, caching, and transaction notifications

27 lines 1.04 kB
import type { FC, ReactNode } from "react"; export interface SubscriptionProviderProps { children: ReactNode; } /** * Provider component for WebSocket account subscriptions. * * This provider: * - Creates a SubscriptionManager for handling WebSocket subscriptions to Solana accounts * - Automatically de-duplicates subscriptions (multiple components subscribing to the same account share one WebSocket) * - Updates React Query cache when account data changes on-chain * - Cleans up subscriptions when all subscribers unmount * * This provider is automatically included in GrillHeadlessProvider and GrillProvider, * so you typically don't need to use it directly. * * @example * ```tsx * // Usually you don't need to use this directly - it's included in GrillProvider * // But if you need standalone subscription support: * <SubscriptionProvider> * <App /> * </SubscriptionProvider> * ``` */ export declare const SubscriptionProvider: FC<SubscriptionProviderProps>; //# sourceMappingURL=subscription-provider.d.ts.map