mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 12:21:01 +00:00
1 line
3.4 KiB
Plaintext
1 line
3.4 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":["*"]}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = useRefEffect;\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":43,"map":[[6,2,11,0],[6,6,11,0,"_react"],[6,12,11,0],[6,15,11,0,"require"],[6,22,11,0],[6,23,11,0,"_dependencyMap"],[6,37,11,0],[7,2,1,0],[8,0,2,0],[9,0,3,0],[10,0,4,0],[11,0,5,0],[12,0,6,0],[13,0,7,0],[14,0,8,0],[15,0,9,0],[17,2,12,0],[18,0,13,0],[19,0,14,0],[20,0,15,0],[21,0,16,0],[22,0,17,0],[23,0,18,0],[24,0,19,0],[25,0,20,0],[26,0,21,0],[27,0,22,0],[28,0,23,0],[29,0,24,0],[30,0,25,0],[31,2,26,15],[31,11,26,24,"useRefEffect"],[31,23,26,36,"useRefEffect"],[31,24,26,37,"effect"],[31,30,26,43],[31,32,26,45],[32,4,27,2],[32,8,27,6,"cleanupRef"],[32,18,27,16],[32,21,27,19],[32,25,27,19,"useRef"],[32,38,27,25],[32,40,27,26,"undefined"],[32,49,27,35],[32,50,27,36],[33,4,28,2],[33,11,28,9],[33,15,28,9,"useCallback"],[33,33,28,20],[33,35,28,21,"instance"],[33,43,28,29],[33,47,28,33],[34,6,29,4],[34,10,29,8,"cleanupRef"],[34,20,29,18],[34,21,29,19,"current"],[34,28,29,26],[34,30,29,28],[35,8,30,6,"cleanupRef"],[35,18,30,16],[35,19,30,17,"current"],[35,26,30,24],[35,27,30,25],[35,28,30,26],[36,8,31,6,"cleanupRef"],[36,18,31,16],[36,19,31,17,"current"],[36,26,31,24],[36,29,31,27,"undefined"],[36,38,31,36],[37,6,32,4],[38,6,33,4],[38,10,33,8,"instance"],[38,18,33,16],[38,22,33,20],[38,26,33,24],[38,28,33,26],[39,8,34,6,"cleanupRef"],[39,18,34,16],[39,19,34,17,"current"],[39,26,34,24],[39,29,34,27,"effect"],[39,35,34,33],[39,36,34,34,"instance"],[39,44,34,42],[39,45,34,43],[40,6,35,4],[41,4,36,2],[41,5,36,3],[41,7,36,5],[41,8,36,6,"effect"],[41,14,36,12],[41,15,36,13],[41,16,36,14],[42,2,37,0],[43,0,37,1],[43,3]],"functionMap":{"names":["<global>","useRefEffect","<anonymous>"],"mappings":"AAA;eCyB;qBCE;GDQ"}},"type":"js/module"}]} |