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

Last Updated: 12 June, 2024