103fe236cf992b375a78d118aee45337.json
1.73 KB
{"ast":null,"code":"import * as React from 'react';\nimport { useRef } from 'react';\nexport default function useRefs() {\n var cacheRefs = useRef(new Map());\n\n function getRef(key) {\n if (!cacheRefs.current.has(key)) {\n cacheRefs.current.set(key, /*#__PURE__*/React.createRef());\n }\n\n return cacheRefs.current.get(key);\n }\n\n function removeRef(key) {\n cacheRefs.current.delete(key);\n }\n\n return [getRef, removeRef];\n}","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/rc-tabs/es/hooks/useRefs.js"],"names":["React","useRef","useRefs","cacheRefs","Map","getRef","key","current","has","set","createRef","get","removeRef","delete"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,MAAT,QAAuB,OAAvB;AACA,eAAe,SAASC,OAAT,GAAmB;AAChC,MAAIC,SAAS,GAAGF,MAAM,CAAC,IAAIG,GAAJ,EAAD,CAAtB;;AAEA,WAASC,MAAT,CAAgBC,GAAhB,EAAqB;AACnB,QAAI,CAACH,SAAS,CAACI,OAAV,CAAkBC,GAAlB,CAAsBF,GAAtB,CAAL,EAAiC;AAC/BH,MAAAA,SAAS,CAACI,OAAV,CAAkBE,GAAlB,CAAsBH,GAAtB,EAA2B,aAAaN,KAAK,CAACU,SAAN,EAAxC;AACD;;AAED,WAAOP,SAAS,CAACI,OAAV,CAAkBI,GAAlB,CAAsBL,GAAtB,CAAP;AACD;;AAED,WAASM,SAAT,CAAmBN,GAAnB,EAAwB;AACtBH,IAAAA,SAAS,CAACI,OAAV,CAAkBM,MAAlB,CAAyBP,GAAzB;AACD;;AAED,SAAO,CAACD,MAAD,EAASO,SAAT,CAAP;AACD","sourcesContent":["import * as React from 'react';\nimport { useRef } from 'react';\nexport default function useRefs() {\n var cacheRefs = useRef(new Map());\n\n function getRef(key) {\n if (!cacheRefs.current.has(key)) {\n cacheRefs.current.set(key, /*#__PURE__*/React.createRef());\n }\n\n return cacheRefs.current.get(key);\n }\n\n function removeRef(key) {\n cacheRefs.current.delete(key);\n }\n\n return [getRef, removeRef];\n}"]},"metadata":{},"sourceType":"module"}