UNPKG

@mantine/hooks

Version:

A collection of 50+ hooks for state and UI management

14 lines (13 loc) 341 B
"use client"; import { useEffect, useRef } from "react"; //#region packages/@mantine/hooks/src/use-previous/use-previous.ts function usePrevious(value) { const ref = useRef(void 0); useEffect(() => { ref.current = value; }, [value]); return ref.current; } //#endregion export { usePrevious }; //# sourceMappingURL=use-previous.mjs.map