@rbxts/react-hooks
Version:
Generated by [Rojo](https://github.com/rojo-rbx/rojo) 7.4.0.
13 lines (12 loc) • 737 B
TypeScript
/// <reference types="@rbxts/compiler-types" />
/// <reference types="@rbxts/compiler-types" />
/**
* Returns a memoized value that is created by the `createValue` function and cleaned up by the `cleanupValue` function.
* The memoized value is recalculated when any of the dependencies change.
*
* @param createValue - A function that creates the memoized value.
* @param cleanupValue - A function that cleans up the memoized value.
* @param dependencies - An array of dependencies that trigger the recalculation of the memoized value.
* @return The memoized value.
*/
export declare function useMemoWithCleanup<T extends defined>(createValue: () => T, cleanupValue: (value: T) => void, dependencies: ReadonlyArray<unknown>): T;