@resourge/react-fetch
Version:
[](LICENSE)
21 lines (18 loc) • 470 B
JavaScript
/**
* react-fetch v1.43.1
*
* Copyright (c) resourge.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
import { useRef } from 'react';
const useEffectEvent = method => {
const methodRef = useRef(method);
methodRef.current = method;
return (...args) => methodRef.current(...args);
};
export { useEffectEvent };
//# sourceMappingURL=useEffectEvent.js.map