Skip to main content

PropTreeNode Interface

A type erased TreeNode for use in react props.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/react/alpha.

For more information about our API support guarantees, see here.

Signature

export interface PropTreeNode<T extends TreeNode> extends ErasedType<[T, "PropTreeNode"]>

Extends: ErasedType<[T, "PropTreeNode"]>

Type Parameters

ParameterConstraintDescription
TTreeNode

Remarks

Read content from the node using usePropTreeNode(propNode, trackDuring) or usePropTreeRecord(props, f).

In events where tracking dependencies is not required, the node can be unwrapped using unwrapPropTreeNode(propNode).

To convert a TreeNode to this type use toPropTreeNode(node) or toPropTreeRecord(node).