Hooks and components for consuming remirror with your fave framework React.
Overall
score
36%
Evaluation — 36%
↑ 1.09xAgent success when using this tile
Build a small utility module that leverages the dependency's React element toolkit to sanitize children, extract props from specific components, and render item lists with stable performance characteristics.
ReactNode tree (elements, fragments, text, null/undefined/booleans) into an ordered array of renderable entries that preserves keys for elements and keeps plain strings. @testnull, undefined, false, true, and empty fragments entirely while flattening nested fragments. @testSlotRenderer component renders a list of items using a render callback, shows a fallback element when the list is empty, and avoids re-rendering slots when neither items nor render change. @test@generates
import type { Key, ReactElement, ReactNode } from "react";
export type NormalizedChild =
| { kind: "element"; element: ReactElement; key: Key | null }
| { kind: "text"; text: string };
export function normalizeChildren(input: ReactNode): NormalizedChild[];
export function collectPropsByName(
children: ReactNode,
componentName: string
): Record<string, unknown>[];
export interface SlotRendererProps<T> {
items: readonly T[];
render: (item: T, index: number) => ReactElement;
fallback?: ReactElement;
}
export function SlotRenderer<T>(props: SlotRendererProps<T>): ReactElement;Provides React element inspection, child mapping/cloning, stable callback utilities, and performance wrappers required for this task.
docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10