UNPKG

@gravity-ui/uikit

Version:

Gravity UI base styling and components

13 lines (12 loc) 406 B
import * as React from 'react'; import { mergeRefs } from "./mergeRefs.js"; export function useForkRef(...refs) { return React.useMemo(() => { if (refs.every((ref) => ref === null || ref === undefined)) { return null; } return mergeRefs(...refs); // eslint-disable-next-line react-hooks/exhaustive-deps }, refs); } //# sourceMappingURL=useForkRef.js.map