import React, { View, Component, NavigationExperimental } from 'react-native';
import Tabs from 'react-native-tabs';
import DefaultRenderer from './DefaultRenderer';
import Actions from './Actions';
const {
    AnimatedView: NavigationAnimatedView,
    CardStack: NavigationCardStack,
    Container: NavigationContainer,
    Header: NavigationHeader,
    Reducer: NavigationReducer,
    RootContainer: NavigationRootContainer,
    View: NavigationView,
    } = NavigationExperimental;


export default class extends Component {
  onSelect(el) {
    const state = this.props.navigationState;
    if (!Actions[el.props.name]) {
      throw new Error('No action is defined for name=' + el.props.name + ' actions:' + JSON.stringify(Object.keys(Actions)));
    }
    Actions[el.props.name]();
  }

  _renderScene(props) {
    if (props.layout) {
            // for 0.24+, props is /*NavigationSceneRendererProps*/ (add flow def above when phasing out < 0.24 support)
      return <DefaultRenderer key={props.scene.navigationState.key} navigationState={props.scene.navigationState} />;
    } else {
            // for < 0.24
      return <DefaultRenderer key={props.key} navigationState={props} />;
    }
  }

  render() {
    const state = this.props.navigationState;
    let selected = state.children[state.index];
    while (selected.hasOwnProperty('children')) {
      selected = selected.children[selected.index];
    }
    const hideTabBar = state.hideTabBar || selected.hideTabBar;
    return (<View style={{ flex:1 }}>
                    <NavigationView
                      navigationState={this.props.navigationState}
                      style={{ flex:1 }}
                      renderScene={this._renderScene}
                    />
            {!hideTabBar && state.children.filter(el => el.icon).length > 0 && <Tabs style={[{ backgroundColor:'white' }, state.tabBarStyle]} onSelect={this.onSelect.bind(this)} {...state}
              selected={state.children[state.index].sceneKey}
    >
                    {state.children.filter(el => el.icon || this.props.tabIcon).map(el => {
                      const Icon = el.icon || this.props.tabIcon;
                      return <Icon {...this.props} {...el} />;
                    })}
                </Tabs>}

            </View>);
  }
}


@@ -206,18 +206,8 @@
 %7B%0A  
-  Animated
 View
@@ -222,230 +222,14 @@
 tion
-AnimatedView,%0A    CardStack: NavigationCardStack,%0A    Container: NavigationContainer,%0A    Header: NavigationHeader,%0A    Reducer: NavigationReducer,%0A    RootContainer: NavigationRootContainer,%0A    View: NavigationView,%0A    
+View,%0A
 %7D = 
@@ -299,70 +299,169 @@
 t %7B%0A
+%0A
   
+c
 on
-Select(el) %7B%0A    const state = this.props.navigationState;
+structor(props) %7B%0A    super(props);%0A    this.onSelect = this.onSelect.bind(this);%0A    this.renderScene = this.renderScene.bind(this);%0A  %7D%0A%0A  onSelect(el) %7B
 %0A   
@@ -514,16 +514,25 @@
 w Error(
+%0A        
 'No acti
@@ -573,16 +573,24 @@
 s.name +
+%0A       
  ' actio
@@ -678,17 +678,16 @@
 %0A  %7D%0A%0A  
-_
 renderSc
@@ -790,16 +790,31 @@
 rProps*/
+%0A            //
  (add fl
@@ -864,32 +864,42 @@
 t)%0A      return 
+(%0A        
 %3CDefaultRenderer
@@ -890,32 +890,42 @@
 %3CDefaultRenderer
+%0A         
  key=%7Bprops.scen
@@ -942,24 +942,34 @@
 onState.key%7D
+%0A         
  navigationS
@@ -1006,34 +1006,35 @@
 ate%7D
- /%3E;
 %0A    
-%7D else %7B%0A        
+    /%3E%0A      );%0A    %7D%0A
     
@@ -1047,18 +1047,16 @@
  %3C 0.24%0A
-  
     retu
@@ -1119,22 +1119,16 @@
 ps%7D /%3E;%0A
-    %7D%0A
   %7D%0A%0A  r
@@ -1419,13 +1419,28 @@
 rn (
-%3CView
+%0A      %3CView%0A       
  sty
@@ -1454,26 +1454,22 @@
 lex:
+ 
 1 %7D%7D
-%3E%0A     
+%0A
       
- 
+%3E%0A
     
@@ -1498,28 +1498,16 @@
         
-       
-     
 navigati
@@ -1543,28 +1543,16 @@
 nState%7D%0A
-            
         
@@ -1571,25 +1571,14 @@
 lex:
+ 
 1 %7D%7D%0A
-            
     
@@ -1605,9 +1605,8 @@
 his.
-_
 rend
@@ -1614,28 +1614,16 @@
 rScene%7D%0A
-            
         
@@ -1621,26 +1621,24 @@
 %0A        /%3E%0A
-  
           %7B!
@@ -1705,14 +1705,40 @@
 0 &&
- %3CTabs
+%0A            %3CTabs%0A             
  sty
@@ -1760,16 +1760,17 @@
 ndColor:
+ 
 'white' 
@@ -1791,16 +1791,30 @@
 rStyle%5D%7D
+%0A             
  onSelec
@@ -1829,27 +1829,16 @@
 onSelect
-.bind(this)
 %7D %7B...st
@@ -1908,24 +1908,26 @@
 ey%7D%0A    
-%3E%0A
+  
       
+%3E%0A
         
@@ -2020,22 +2020,16 @@
         
-     
- 
 const Ic
@@ -2080,22 +2080,16 @@
         
-      
 return %3C
@@ -2139,22 +2139,12 @@
     
-   
-   
 %7D)%7D%0A
-    
     
@@ -2164,28 +2164,26 @@
 s%3E%7D%0A
-%0A  
       
-    
 %3C/View%3E
+%0A    
 );%0A 
@@ -2187,9 +2187,8 @@
 ;%0A  %7D%0A%7D%0A
-%0A

FIX ESlint TabBar.js