react-native-a11y
Version:
Improvements of a11y for ReactNative, this library improve work with reader and keyboard focus and reader in general.
11 lines • 395 B
JavaScript
import { useMemo, useRef } from "react";
import { combineRefs } from "../../utils";
export const useCombinedRef = (...refs) => {
const targetRef = useRef(null);
const refCallback = useMemo(() => {
return combineRefs(targetRef, ...refs);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
return [targetRef, refCallback];
};
//# sourceMappingURL=useCombinedRef.js.map