【发布时间】:2019-10-23 12:29:28
【问题描述】:
我正在使用 react-native,并且在我开发时一切都运行良好,但是,当我构建 APK(使用本教程:https://facebook.github.io/react-native/docs/signed-apk-android.html#content)并将其安装到我的设备上时, 平面列表不显示任何数据 一切正常登录屏幕连接到 api 登录 所以 api 运行良好 那么为什么平面列表不显示任何数据 .有人遇到过同样的问题吗?
componentDidMount() {
this.props.getCoffeeCategory()
}
//flatlist code
<FlatList
style={{ flex: 1 }}
showsHorizontalScrollIndicator={false}
horizontal={true}
data={this.props.data}
renderItem={this._renderListItem}
keyExtractor={item => item.id}
/>
【问题讨论】:
-
你能在 UI 中 console.log 或打印 this.props.data 吗?
标签: reactjs react-native react-redux react-native-flatlist