UNPKG

react-attractor

Version:

React library to map DOM elements to React components

27 lines (26 loc) 819 B
import { ReactNode } from 'react'; import { TetherContextValue } from './types'; export interface TetherProviderProps { children: ReactNode; } /** * Provider component that manages tether registrations using WeakMap * * @example * ```tsx * // Usage * <TetherProvider> * <App /> * </TetherProvider> * ``` */ export declare const TetherProvider: ({ children }: TetherProviderProps) => import("react/jsx-runtime").JSX.Element; /** * Hook to access tether context * * @template TMetadata - Type of custom metadata * @throws {Error} When used outside of TetherProvider * @returns {TetherContextValue<TMetadata>} Context value with register and get functions */ export declare const useTetherContext: <TMetadata = unknown>() => TetherContextValue<TMetadata>; //# sourceMappingURL=TetherContext.d.ts.map