UNPKG

fumadocs-ui

Version:

The framework for building a documentation website in Next.js

13 lines (12 loc) 280 B
export function mergeRefs(...refs) { return (value) => { refs.forEach((ref) => { if (typeof ref === 'function') { ref(value); } else if (ref) { ref.current = value; } }); }; }