You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have to pass JSON of Image Urls and Image Description. It is only taking Array of Image Urls currently. How to pass a Array of JSON Objects which consist of Image Url, Image Name and Image Description? Thanks
The text was updated successfully, but these errors were encountered:
you can use a state, in the useeffect load the api const [images, setImages] = useState([]); useEffect(() => { analytics().logEvent(Page_${props.navigation.state.routeName}, {}); api.get(apiEndpoints.news + '0' + '&limit=' + 12).then(response => { //console.log(JSON.stringify(response.data.data.contents)) setImages(response.data.data.contents); }).catch(error => { console.error(error); }); }, []);, set the state with the value, and in the Carousel apply map to the object <Carousel index={5} pageSize={BannerWidth} showsPageIndicator={true}> {images.map((image, index) => renderPage(image, index))} </Carousel>
I have to pass JSON of Image Urls and Image Description. It is only taking Array of Image Urls currently. How to pass a Array of JSON Objects which consist of Image Url, Image Name and Image Description? Thanks
The text was updated successfully, but these errors were encountered: