![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
react native
瓦力冫
喜欢看点书,跑跑步,热爱游戏编程
展开
-
React native fetch json 显示在ListView
1.构造函数设置data为空 constructor(props){ super(props); this.state = { data: null } } 2.fetch 数据把data设置为ListView.DataSource componentDidMount(){ fetch('http://127.0.0.1/getScore/100'...原创 2018-04-21 10:56:13 · 726 阅读 · 0 评论 -
React native ListView 增加顶部下拉刷新和底下点击刷新
1. 底部点击刷新 1.1 先增加一个按钮render() { if(!this.state.data){ return( <Text>Loading... </Text> ) }else{ return( <ListView refreshControl={...原创 2018-04-21 17:29:20 · 689 阅读 · 0 评论