I am trying to add if statement to my code:
const movieList: ListRenderItem<any> = ({ item }) => ( //THIS IS WHAT I WANT TO ADD: item.poster_path !== null &&<View style={styles.movie}><Image style={styles.image} source={{ uri: 'example'+ item.poster_path }} /></View> ); return (<FlatList numColumns={2} keyExtractor={(movie) => movie?.id.toString()} data={movies} renderItem={movieList} /> )
But, I can't add this in this way. How can I add this?