• Renders a given tree with each node being rendered by the included renderer component prop. TreeView is memoized using React.memo

    Type Parameters

    Parameters

    Returns Element

    Example

     type MyPayload = {
    name: string
    };

    const MyNodeRenderer = (props: TreeNodeComponentProps<Tree<MyPayload>>) => {
    return <div>{props.value.name}</div>
    }

    const App = () => {
    const myTree = useTree<MyPayload>();
    return <TreeView value={myTree} renderer={MyNodeRenderer} />
    }