API Reference > ui-components > Tree > useTreeNodeLoader useTreeNodeLoader Function Custom hook which creates a nodes' loader using the supplied data provider and model source. The loader pulls nodes from the data provider and puts them into the model source. useTreeNodeLoader<TDataProvider extends TreeDataProvider>(dataProvider: TDataProvider, modelSource: TreeModelSource): TreeNodeLoader<TDataProvider> Parameter Type Description dataProvider TDataProvider modelSource TreeModelSource Returns - TreeNodeLoader<TDataProvider> Defined in ui/components/src/ui-components/tree/controlled/TreeHooks.ts Line 44 Last Updated: 12 June, 2024