react-native-a11y
Version:
Improvements of a11y for ReactNative, this library improve work with reader and keyboard focus and reader in general.
20 lines (19 loc) • 610 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.combineRefs = void 0;
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;
}
});
};
exports.combineRefs = combineRefs;
//# sourceMappingURL=combineRefs.js.map
;