React-native-elements: ListItem title and subtitle completely blank

Created on 21 Jul 2017  路  1Comment  路  Source: react-native-elements/react-native-elements

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',
  },
 });

whatsapp image 2017-07-20 at 10 00 52 pm

Most helpful comment

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

>All comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pacozaa picture pacozaa  路  3Comments

vbagustinus picture vbagustinus  路  3Comments

binzailani3136 picture binzailani3136  路  3Comments

kk412027247 picture kk412027247  路  3Comments

motogod picture motogod  路  3Comments