UNPKG

@zag-js/preact

Version:

The preact wrapper for zag

17 lines (16 loc) 260 B
// src/refs.ts import { useRef } from "preact/hooks"; function useRefs(refs) { const ref = useRef(refs); return { get(key) { return ref.current[key]; }, set(key, value) { ref.current[key] = value; } }; } export { useRefs };