Dynamic
Renders an arbitrary custom or native component and forwards the other
props. JSX form of dynamic() — same primitive, picked at the JSX site.
<Dynamic>is the JSX convenience wrapper fordynamic(). Preferdynamic()when you need a reusable stable component reference.
Import
import { Dynamic } from "@solidjs/web";Type signature
function Dynamic<T extends ValidComponent>(props: DynamicProps<T>): JSX.Element;Examples
<Dynamic component={multiline() ? RichTextEditor : "input"} value={value()} onInput={onInput}/>Related types
DynamicProps
type DynamicProps<T extends ValidComponent, P = ComponentProps<T>> = { [K in keyof P]: P[K];} & { component: T | null | undefined | false;};