loadData () {
this.setState({
isLoading:true
})
let url = this.getUrl('?since=daily',this.props.tabLabel);
this.dataTool.fetchNetworking(url)
.then(result => {
this.setState({
dataSource:this.state.dataSource.cloneWithRows(result),
isLoading: false,
})
})
.catch(error => {
this.setState({
result:JSON.stringify(error),
isLoading: false,
})
})
}
getUrl(timeRange, keyword){
return BASE_URL + keyword + timeRange;
}
renderRow (data) {
return <TrendingCell onSelect={(data) => this.onSelect(data)} data={data} />
}