Packages
React inside Phoenix LiveView — async code splitting, client-side props diffing, and zero-config component discovery.
Retired package: Release invalid - Not production-ready, LiveView 1.0.x compatibility issue
Current section
Files
Jump to
Current section
Files
assets/dist/utils.d.ts
import { type ComponentType, type ReactNode } from "react";
import type { HookProps, LiveViewHook } from "./types";
/**
* Extract the six hook functions from a LiveView hook instance and bind them
* so they can be passed as props to React components.
*/
export declare function getHookFunctions(hook: LiveViewHook): HookProps;
/**
* Wrap a component in the ReactPhxProvider, injecting the hook functions
* into context and rendering the component with the given props and children.
*/
export declare function getComponentTree(Component: ComponentType<any>, props: Record<string, unknown> & HookProps, children: ReactNode[]): React.JSX.Element;