react-native-a11y
Version:
Improvements of a11y for ReactNative, this library improve work with reader and keyboard focus and reader in general.
13 lines • 472 B
JavaScript
export const combineRefs = function () {
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
refs[_key] = arguments[_key];
}
return component => refs.forEach(item => {
if (typeof item === "function") {
item(component);
} else if (item !== null && (item === null || item === void 0 ? void 0 : item.current) !== undefined) {
item.current = component;
}
});
};
//# sourceMappingURL=combineRefs.js.map