@hadyfayed/filament-react-wrapper
Version:
Enterprise React integration for Laravel/Filament - Smart asset loading, 90%+ React-PHP function mapping, no-plugin Filament integration
42 lines • 1.29 kB
TypeScript
export interface ReactRendererProps {
component: string;
props?: Record<string, unknown>;
statePath?: string;
containerId: string;
onDataChange?: (data: unknown) => void;
onError?: (error: Error) => void;
}
export declare class UniversalReactRenderer {
private roots;
private containers;
/**
* Render a React component in the specified container
*/
render({ component, props, statePath, containerId, onDataChange, onError, }: ReactRendererProps): void;
/**
* Update props for an already rendered component
*/
updateProps(containerId: string, newProps: Record<string, unknown>): void;
/**
* Unmount a React component
*/
unmount(containerId: string): void;
/**
* Check if a component is rendered in the specified container
*/
isRendered(containerId: string): boolean;
/**
* Unmount all rendered components
*/
unmountAll(): void;
/**
* Get list of active container IDs
*/
getActiveContainers(): string[];
/**
* Check if a container has an active React component
*/
hasActiveComponent(containerId: string): boolean;
}
export declare const universalReactRenderer: UniversalReactRenderer;
//# sourceMappingURL=UniversalReactRenderer.d.ts.map