UNPKG

@mantine/hooks

Version:

A collection of 50+ hooks for state and UI management

14 lines (11 loc) 269 B
'use client'; import { useRef, useEffect } from 'react'; function usePrevious(value) { const ref = useRef(void 0); useEffect(() => { ref.current = value; }, [value]); return ref.current; } export { usePrevious }; //# sourceMappingURL=use-previous.mjs.map