Files
NapCatQQ/.pnpm-store/v3/files/ec/01f1a3dbe9516e80fd1200331f2c1ba9aed33a29a42b6512f6811aad8180dadbcdd3183d77a7cb321d7fb5f7fe81a9e5b126929c0eb50eaed4fd2cb7e3d427
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

15 lines
499 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 };