Skip to main content

TNodeRendererProps

export
interface TNodeRendererProps<
  T extends TNode
> {
  propsFromParent?: PropsFromParent;
  renderIndex: number;
  renderLength: number;
  tnode: T;
}

Props for ​TNodeRenderer component.

Type Parameters#

T#

The concrete type of ​TNode.

Fields#

propsFromParent#

optional
propsFromParent?: PropsFromParent;

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.