I have already checked some similar questions with the same problem:

CodePudding user response:
You can try
this.setState({
dataNews:responseJson?.articles, // add articals here
dataBanner:responseJson?.articles // add articals here
})
and also you can validate
<Swiper>
{this.state.dataBanner?.length > 0 && this.state.dataBanner.map((itemImg) => {
return (
<Image
source={{ uri: itemImg.urlToImage }}
style={{ height: "100%", width: "100%" }}
/>
)
})}
</Swiper>
