UNPKG

rooks

Version:

Collection of awesome react hooks

14 lines (13 loc) 495 B
/** * useDidUpdate hook * * Fires a callback on component update * Can take in a list of conditions to fire callback when one of the * conditions changes * * @param {Function} callback The callback to be called on update * @param {Array} conditions The list of variables which trigger update when they are changed * @see https://rooks.vercel.app/docs/hooks/useDidUpdate */ declare function useDidUpdate(callback: () => void, conditions?: unknown[]): void; export { useDidUpdate };