onRefresh function Example

suggest change
_refreshListView(){
  //Start Rendering Spinner
  this.setState({refreshing:true})
  this.state.cars.push(
    {name:'Fusion',color:'Black'},
    {name:'Yaris',color:'Blue'}
  )
  //Updating the dataSource with new data
  this.setState({ dataSource:
      this.state.dataSource.cloneWithRows(this.state.cars) })
  this.setState({refreshing:false}) //Stop Rendering Spinner
}

here we are updating the array and after that we will update the dataSource. we can use fetch to request something from server and use async/await.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


RefreshControl with ListView:
*onRefresh function Example

Table Of Contents