【发布时间】:2019-04-23 13:04:10
【问题描述】:
我是 react native 的新手,我想让数据功能进入视图。
我的函数是这样的
renderTest = () => {
<FlatList
onEndReached={0}
onEndReached={() => this.handleEnd()}
>
{_.map(this.state.leads, (leads, index) => {
return (
<Text key={index}>{leads.full_name}</Text>
)
})}
</FlatList>
}
和我的View传递函数的值
<View style={{flexDirection: 'row'}}>
{this.renderTest()}
</View>
我不知道有什么问题,我只想渲染值。我希望有人能帮助我。
编辑
【问题讨论】:
标签: react-native lodash