Данные - это массив URL -адресов, а MaxResults - это всего лишь целое число: < /p>
Код: Выделить всё
function VideoScreenWrapper({data, maxResults}){
const videoRef = useRef([]);
const onError = (error) => {
console.log("Error: ", error);
}
console.log("Data in VideoScreenWrapper: ", data);
if (data && data.length>0){
return(
{data.slice(0, maxResults).map((item, index) => (
videoRef.current[index] = el}
onError={onError}
//style={styles.backgroundVideo}
resizeMode='cover'
controls
/>
))}
);
}else {
return(
No data
);
}
}
Подробнее здесь: https://stackoverflow.com/questions/794 ... ig-of-null
Мобильная версия