react-native-keyboard-controller
Version:
Keyboard manager which works in identical way on both iOS and Android
24 lines (23 loc) • 578 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = require("react");
const useCombinedRef = (...refs) => {
return (0, _react.useCallback)(value => {
for (const ref of refs) {
if (!ref) {
continue;
}
if (typeof ref === "function") {
ref(value);
} else {
ref.current = value;
}
}
// eslint-disable-next-line react-compiler/react-compiler
}, refs);
};
var _default = exports.default = useCombinedRef;
//# sourceMappingURL=useCombinedRef.js.map