Files
SnowLuma/.pnpm-store/v11/files/4c/aec903387394688aa80dfc012a224f8a046bd87b3e69818f8964c3fbd64e6734670522fee906f86b21be94d10a36ad444841ee1eafbca8d136ba024e53e8b2
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

16 lines
551 B
Plaintext

"use client";
import { useInsertionEffect } from 'react';
function useMotionValueEvent(value, event, callback) {
/**
* useInsertionEffect will create subscriptions before any other
* effects will run. Effects run upwards through the tree so it
* can be that binding a useLayoutEffect higher up the tree can
* miss changes from lower down the tree.
*/
useInsertionEffect(() => value.on(event, callback), [value, event, callback]);
}
export { useMotionValueEvent };
//# sourceMappingURL=use-motion-value-event.mjs.map