import { DependencyList } from 'react'; /** * Allows you allocate resources synchronously while ensuring they will be properly disposed when the * `deps` change or when the component gets unmounted. * * Works just like `useMemo` with the addition of the dispose callback. * * Note that it is ensured that the previous allocated value will be disposed prior allocating a new one. * * @param factory factory function that returns a tuple of the allocated value and a dispose callback * @param deps dependencies of the factory function * @typeParam T type of the allocated value * @returns the allocated value * @category Hook */ export declare function useDisposable(factory: () => [T, () => void], deps: DependencyList): T; //# sourceMappingURL=use-disposable.d.ts.map