My flatlist is wrapping, but I don't want it to. Is this specific to the data type?
Here is the relavant code if I use flatlist:
<View>
<Text style={styles.statLabel}>
Habilidad(es)
</Text>
<FlatList
data={ this.state.pokemonAbilities }
renderItem={({item}) => <Text style={styles.statData}>{item.node}</Text>
}
keyExtractor={(item) => item.id}
/>
</View>
When I render this code, the "Habilidades" is not under the other two stats as it should be. Instead, it wraps and ends up on the right: Render with FlatList
When I remove the flatlist and instead use placeholder text, it works:
<View>
<Text style={styles.statLabel}>
Habilidad(es)
</Text>
<Text>
Placeholder
</Text>
</View>
The above code renders the following: Code with placeholder
The styles for abilityContainer, statsLabel, and statsData are here:
statLabel: {
color: 'white',
fontSize: 20,
},
stateData: {
marginBottom: 20
},