FlatList的style属性传入justifyContent 出现报错
<FlatList
style={teacherListStyles.listBox}
.....
/ >
//listBox: {
// ....
// justifyContent: 'space-between',
//}
ScrollView child layout ([“justifyContent”]) must be applied through the contentContainerStyle prop
解决方法:
<FlatList
style={teacherListStyles.listBox}
contentContainerStyle={teacherListStyles.justify}
.....
/ >```
把 justifyContent的样式写到 contentContainerStyle 内即可