API Reference > ui-components > Tree > useTreeEventsHandler useTreeEventsHandler Function Custom hook which creates and takes care of disposing a TreeEventsHandler. The input is either a factory method for a custom TreeEventHandler implementation or parameters for the default implementation. useTreeEventsHandler<TEventsHandler extends TreeEventHandler<TEventsHandler>>(factoryOrParams: TreeEventHandlerParams | () => TEventsHandler): TreeEventHandler note Caller must ensure factoryOrParams changes only when a new handler needs to be created. useCallback or useMemo can be used for that purpose based on whether the input is a factory function or params object. Parameter Type Description factoryOrParams TreeEventHandlerParams | () => TEventsHandler Returns - TreeEventHandler Defined in ui/components/src/ui-components/tree/controlled/TreeHooks.ts Line 82 Last Updated: 12 June, 2024