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

21 lines
593 B
Plaintext

"use client";
import { collectMotionValues } from 'motion-dom';
import { useCombineMotionValues } from './use-combine-values.mjs';
function useComputed(compute) {
/**
* Open session of collectMotionValues. Any MotionValue that calls get()
* will be saved into this array.
*/
collectMotionValues.current = [];
compute();
const value = useCombineMotionValues(collectMotionValues.current, compute);
/**
* Synchronously close session of collectMotionValues.
*/
collectMotionValues.current = undefined;
return value;
}
export { useComputed };