• Renders a given tree with each node being rendered by the included renderer component prop. Off-screen nodes will be rendered as placeholders and swapped out for actual nodes when they appear on screen. LazyTreeView 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 <LazyTreeView value={myTree} renderer={MyNodeRenderer} placeholderHeight={32} />
    }