{"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(value: T) {\n const ref = useRef(null)\n ref.current = value\n return ref as React.MutableRefObject\n}\n"],"mappings":";;;AAAA,SAAS,cAAc;AAQhB,SAAS,aAAgB,OAAU;AACxC,QAAM,MAAM,OAAiB,IAAI;AACjC,MAAI,UAAU;AACd,SAAO;AACT;","names":[]}