Files
wdi-dashboard/node_modules/@chakra-ui/react-use-latest-ref/dist/index.mjs.map
2024-08-16 15:06:52 +05:30

1 line
536 B
Plaintext

{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { useRef } from \"react\"\n\n/**\n * React hook to persist any value between renders,\n * but keeps it up-to-date if it changes.\n *\n * @param value the value or function to persist\n */\nexport function useLatestRef<T>(value: T) {\n const ref = useRef<T | null>(null)\n ref.current = value\n return ref as React.MutableRefObject<T>\n}\n"],"mappings":";;;AAAA,SAAS,cAAc;AAQhB,SAAS,aAAgB,OAAU;AACxC,QAAM,MAAM,OAAiB,IAAI;AACjC,MAAI,UAAU;AACd,SAAO;AACT;","names":[]}