I have an Array:
const categoriesList = [
'Aperitivos',
'Bebidas',
'L谩cteos',
'Frutas',
'Vegetales'
];
When I try to render it, a blank screen appears:
render(){
return(
<View style={styles.container}>
<List containerStyle={styles.list}>
{
categoriesList.map((category, index) => (
<ListItem title={category} titleStyle={styles.titles} subtitles={'Hello'} key={index} /> ))
}
</List>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: 'column',
alignSelf: 'center',
},
titles: {
color: 'blue',
},
});

flex: 1 didn't adjust it width, solution: "width: '100%'"
Most helpful comment
flex: 1 didn't adjust it width, solution: "width: '100%'"