UNPKG

@open-condo/miniapp-utils

Version:

A set of helper functions / components / hooks used to build new condo apps fast

13 lines 266 B
// src/hooks/usePrevious.ts import { useEffect, useRef } from "react"; function usePrevious(state) { const ref = useRef(); useEffect(() => { ref.current = state; }); return ref.current; } export { usePrevious }; //# sourceMappingURL=usePrevious.mjs.map