| // src/use-callback-ref.tsx | |
| import * as React from "react"; | |
| function useCallbackRef(callback) { | |
| const callbackRef = React.useRef(callback); | |
| React.useEffect(() => { | |
| callbackRef.current = callback; | |
| }); | |
| return React.useMemo(() => ((...args) => callbackRef.current?.(...args)), []); | |
| } | |
| export { | |
| useCallbackRef | |
| }; | |
| //# sourceMappingURL=index.mjs.map | |
Xet Storage Details
- Size:
- 357 Bytes
- Xet hash:
- 7ab4eb11fa358354e60bd9979d7088671e9706b03f05b887952d73a607566d18
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.