99bd7913910f8568e398337d6dc3623f.json 2.01 KB
{"ast":null,"code":"var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require(\"react\"));var _base=require(\"../base\");function useCode(exec,deps){if(typeof _react.default.useEffect==='function'){_react.default.useEffect(function(){if(typeof exec!=='function'){console.warn('useCode() first argument should be a function that returns an animation node.');}var animatedAlways=(0,_base.always)(typeof exec==='function'?exec():exec);animatedAlways.__attach();return function(){animatedAlways.__detach();};},deps);}}var _default=useCode;exports.default=_default;","map":{"version":3,"sources":["C:/Users/bluej/Desktop/2_2/searchGuide/searchGuide/node_modules/react-native-reanimated/src/derived/useCode.js"],"names":["useCode","exec","deps","React","useEffect","console","warn","animatedAlways","__attach","__detach"],"mappings":"mKAAA,oDACA,6BAEA,QAASA,CAAAA,OAAT,CAAiBC,IAAjB,CAAuBC,IAAvB,CAA6B,CAC3B,GAAI,MAAOC,gBAAMC,SAAb,GAA2B,UAA/B,CAA2C,CACzCD,eAAMC,SAAN,CAAgB,UAAM,CACpB,GAAI,MAAOH,CAAAA,IAAP,GAAgB,UAApB,CAAgC,CAC9BI,OAAO,CAACC,IAAR,CACE,+EADF,EAGD,CACD,GAAMC,CAAAA,cAAc,CAAG,iBAAO,MAAON,CAAAA,IAAP,GAAgB,UAAhB,CAA6BA,IAAI,EAAjC,CAAsCA,IAA7C,CAAvB,CACAM,cAAc,CAACC,QAAf,GACA,MAAO,WAAM,CACXD,cAAc,CAACE,QAAf,GACD,CAFD,CAGD,CAXD,CAWGP,IAXH,EAYD,CACF,C,aACcF,O","sourcesContent":["import React from 'react';\nimport { always } from '../base';\n\nfunction useCode(exec, deps) {\n  if (typeof React.useEffect === 'function') {\n    React.useEffect(() => {\n      if (typeof exec !== 'function') {\n        console.warn(\n          'useCode() first argument should be a function that returns an animation node.'\n        );\n      }\n      const animatedAlways = always(typeof exec === 'function' ? exec() : exec);\n      animatedAlways.__attach();\n      return () => {\n        animatedAlways.__detach();\n      };\n    }, deps);\n  }\n}\nexport default useCode;\n"]},"metadata":{},"sourceType":"script"}