UNPKG

ariakit-react-utils

Version:

Ariakit React utils

13 lines (11 loc) 206 B
/** * Sets both a function and object React ref. */ function setRef(ref, value) { if (typeof ref === "function") { ref(value); } else if (ref) { ref.current = value; } } export { setRef };