mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 15:41:01 +00:00
1 line
3.9 KiB
Plaintext
1 line
3.9 KiB
Plaintext
{"dependencies":[{"name":"react","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":11,"column":0,"index":210},"end":{"line":11,"column":44,"index":254}}],"key":"RtGiGa+/H7VrI7GDQDLhO1UbpU8=","exportNames":["*"],"imports":1}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n Object.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return useRefEffect;\n }\n });\n var _react = require(_dependencyMap[0], \"react\");\n /**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n\n /**\n * Constructs a callback ref that provides similar semantics as `useEffect`. The\n * supplied `effect` callback will be called with non-null component instances.\n * The `effect` callback can also optionally return a cleanup function.\n *\n * When a component is updated or unmounted, the cleanup function is called. The\n * `effect` callback will then be called again, if applicable.\n *\n * When a new `effect` callback is supplied, the previously returned cleanup\n * function will be called before the new `effect` callback is called with the\n * same instance.\n *\n * WARNING: The `effect` callback should be stable (e.g. using `useCallback`).\n */\n function useRefEffect(effect) {\n var cleanupRef = (0, _react.useRef)(undefined);\n return (0, _react.useCallback)(instance => {\n if (cleanupRef.current) {\n cleanupRef.current();\n cleanupRef.current = undefined;\n }\n if (instance != null) {\n cleanupRef.current = effect(instance);\n }\n }, [effect]);\n }\n});","lineCount":50,"map":[[7,2,26,15,"Object"],[7,8,26,15],[7,9,26,15,"defineProperty"],[7,23,26,15],[7,24,26,15,"exports"],[7,31,26,15],[8,4,26,15,"enumerable"],[8,14,26,15],[9,4,26,15,"get"],[9,7,26,15],[9,18,26,15,"get"],[9,19,26,15],[10,6,26,15],[10,13,26,15,"useRefEffect"],[10,25,26,15],[11,4,26,15],[12,2,26,15],[13,2,11,0],[13,6,11,0,"_react"],[13,12,11,0],[13,15,11,0,"require"],[13,22,11,0],[13,23,11,0,"_dependencyMap"],[13,37,11,0],[14,2,1,0],[15,0,2,0],[16,0,3,0],[17,0,4,0],[18,0,5,0],[19,0,6,0],[20,0,7,0],[21,0,8,0],[22,0,9,0],[24,2,12,0],[25,0,13,0],[26,0,14,0],[27,0,15,0],[28,0,16,0],[29,0,17,0],[30,0,18,0],[31,0,19,0],[32,0,20,0],[33,0,21,0],[34,0,22,0],[35,0,23,0],[36,0,24,0],[37,0,25,0],[38,2,26,15],[38,11,26,24,"useRefEffect"],[38,23,26,36,"useRefEffect"],[38,24,26,37,"effect"],[38,30,26,43],[38,32,26,45],[39,4,27,2],[39,8,27,6,"cleanupRef"],[39,18,27,16],[39,21,27,19],[39,25,27,19,"useRef"],[39,31,27,25],[39,32,27,25,"useRef"],[39,38,27,25],[39,40,27,26,"undefined"],[39,49,27,35],[39,50,27,36],[40,4,28,2],[40,11,28,9],[40,15,28,9,"useCallback"],[40,21,28,20],[40,22,28,20,"useCallback"],[40,33,28,20],[40,35,28,21,"instance"],[40,43,28,29],[40,47,28,33],[41,6,29,4],[41,10,29,8,"cleanupRef"],[41,20,29,18],[41,21,29,19,"current"],[41,28,29,26],[41,30,29,28],[42,8,30,6,"cleanupRef"],[42,18,30,16],[42,19,30,17,"current"],[42,26,30,24],[42,27,30,25],[42,28,30,26],[43,8,31,6,"cleanupRef"],[43,18,31,16],[43,19,31,17,"current"],[43,26,31,24],[43,29,31,27,"undefined"],[43,38,31,36],[44,6,32,4],[45,6,33,4],[45,10,33,8,"instance"],[45,18,33,16],[45,22,33,20],[45,26,33,24],[45,28,33,26],[46,8,34,6,"cleanupRef"],[46,18,34,16],[46,19,34,17,"current"],[46,26,34,24],[46,29,34,27,"effect"],[46,35,34,33],[46,36,34,34,"instance"],[46,44,34,42],[46,45,34,43],[47,6,35,4],[48,4,36,2],[48,5,36,3],[48,7,36,5],[48,8,36,6,"effect"],[48,14,36,12],[48,15,36,13],[48,16,36,14],[49,2,37,0],[50,0,37,1],[50,3]],"functionMap":{"names":["<global>","useRefEffect","<anonymous>"],"mappings":"AAA;eCyB;qBCE;GDQ"},"hasCjsExports":false},"type":"js/module"}]} |