API Reference > ui-core > Utilities > useDisposable useDisposable Function A custom hook which creates a disposable object and manages its disposal on unmount or factory method change. useDisposable<TDisposable extends IDisposable>(createDisposable: () => TDisposable): TDisposable Parameter Type Description createDisposable () => TDisposable Returns - TDisposable Defined in ui/core/src/ui-core/utils/hooks/useDisposable.ts Line 17 Last Updated: 12 June, 2024