TNodeRendererProps
export
interface TNodeRendererProps<Â Â T extends TNode> {Â Â propsFromParent?: PropsFromParent;Â Â renderIndex: number;Â Â renderLength: number;Â Â tnode: T;}Defined in packages/render-html/src/shared-types.ts
Props for ​TNodeRenderer component.
Type Parameters#
T#
The concrete type of ​TNode.
Fields#
propsFromParent#
optional
Props passed by direct parents.
renderIndex#
required
renderIndex: number;The position of this React element relative to the parent React element, starting at 0.
Remarks
Not to be confused with ​index, which is
the position of the TNode before hoisting. The latter is much closer
to an intuitive understanding of the position of a DOM node in the DOM
tree.
renderLength#
required
renderLength: number;The total number of elements children of this React element parent.
tnode#
required
tnode: T;The ​TNode to render.