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/server.d.ts
import type { ComponentsOrResolve } from "./types";
/**
* Create a server-side render function for the given component input.
*
* Supports the same three input shapes as `getHooks()`:
* 1. Static object: `getRender({ Counter, Chart })`
* 2. Async loader functions: `getRender({ Counter: () => import("./Counter") })`
* 3. Resolve function: `getRender((name) => import("./components/" + name))`
*
* @param input — a component map (static or lazy) or a resolve function
* @returns an async render function that accepts (name, props, slots) and returns HTML
*/
export declare function getRender(input: ComponentsOrResolve): (name: string, props: Record<string, unknown>, slots: Record<string, string | undefined>) => Promise<string>;