UNPKG

@mitosite-ai/mitosite-react

Version:

Personalize your website for every user!

14 lines (13 loc) 603 B
import React from 'react'; import type { EnvironmentData } from '@mitosite-ai/mitosite-core'; export type ContentUpdateListener = (value: string | null, contentId: string) => void; export interface MitoProviderContextValue { getValue(contentId: string): string | undefined; subscribe(contentId: string, listener: ContentUpdateListener): () => void; register(contentId: string): void; refresh(): Promise<void>; environment: EnvironmentData | null; loading: boolean; error: Error | null; } export declare const MitoContext: React.Context<MitoProviderContextValue | undefined>;