Guest User

Untitled

a guest
Jan 18th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. const MyTab = TabNavigator({
  2. tab1:{screen:TabScreen1},
  3. tab2:{screen:TabScreen2}
  4. }
  5.  
  6.  
  7. class MainScreen extends React.Component{
  8.  
  9. constructor(){
  10. super();
  11. this.state = {
  12. loading:true
  13. }
  14. }
  15.  
  16. componentWillMount(){
  17. //fetch login
  18. //set loading:false when fetch is done
  19. }
  20.  
  21. render(){
  22. !this.state.loading && <MyTab/>
  23. }
  24. }
Add Comment
Please, Sign In to add comment