Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Refresh tab in ScrollableTabView - React native

$
0
0

I am trying different solution from last 3 days. please help me to get on right track.

All the API Calls are in the child components.

How to refresh tab when navigate using ScrollableTabView.

Home.componentsetStateForTabChange(i){  if(i == 0){  }  if(i== 1){  }}
<ScrollableTabView onChangeTab={(event)=>{this.setStateForTabChange(event.i)}}><Scene1 isActive={this.state.isSceneOneVisible} /><Scene2 isActive={this.state.isSceneTwoVisible} /></ScrollableTabView>

when i set a state in setStateForTabChange method after checking condition if(i==0){ this.setState({....})}The ScrollableTabView does not change the tabs.


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>