@gpa-gemstone/helper-functions
Version:
Helper Functions for gpa-gemstone packages
9 lines (8 loc) • 370 B
TypeScript
/**
* This hook provides the ability to run Effects with the previous value beoing provided to the Effect.
*
* @param effect The effect to be run
* @param Number the state that should be cached.
*/
declare function useEffectWithPrevious<T>(effect: (prevVal: T | undefined) => (void | (() => void)), state: T): T | undefined;
export { useEffectWithPrevious };