This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.

1 line
692 B
Plaintext
Raw Permalink Normal View History

2021-04-02 02:24:13 +03:00
{"version":3,"sources":["useValue.js"],"names":["useValue","initialValue","ref","React","useRef","current","AnimatedValue"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEe,SAASA,QAAT,CAAkBC,YAAlB,EAAgC;AAC7C,QAAMC,GAAG,GAAGC,eAAMC,MAAN,CAAa,IAAb,CAAZ;;AACA,MAAIF,GAAG,CAACG,OAAJ,KAAgB,IAApB,EAA0B;AACxBH,IAAAA,GAAG,CAACG,OAAJ,GAAc,IAAIC,sBAAJ,CAAkBL,YAAlB,CAAd;AACD;;AACD,SAAOC,GAAG,CAACG,OAAX;AACD","sourcesContent":["import React from 'react';\nimport AnimatedValue from './core/AnimatedValue';\n\nexport default function useValue(initialValue) {\n const ref = React.useRef(null);\n if (ref.current === null) {\n ref.current = new AnimatedValue(initialValue);\n }\n return ref.current;\n}\n"]}