Tutorial by Examples

_refreshControl(){ return ( <RefreshControl refreshing={this.state.refreshing} onRefresh={()=>this._refreshListView()} /> ) } refreshing: is the state of the spinner (true, false). onRefresh: this function will invoke when refresh the ListView/Scr...
_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.data...
RefreshControl is used inside a ScrollView or ListView to add pull to refresh functionality. at this example we will use it with ListView 'use strict' import React, { Component } from 'react'; import { StyleSheet, View, ListView, RefreshControl, Text } from 'react-native' class RefreshContr...

Page 1 of 1