title: How to return back to previous screen from React StackNavigator to specific Tab
body: <p>I am using React StackNavigator which has structure like this:</p>
  
  <pre><code>-----BottomNavigator
  -------TabNavigator (has 3 screens)
  ---------StackNavigator
  </code></pre>
  
  <p>so I want to return to previous screen from stackNavigator to TabNavigator (screen 2).</p>
  
  <p>Here is my code for TabNavigator:</p>
  
  <pre><code>const ServiceTabNavigator = createMaterialTopTabNavigator(
    {
      screenone: screenone,
      screentwo: screentwo,
      screenthree: screenthree
    },
    {
      tabBarOptions: {
        activeTintColor: "#1B5357",
        inactiveTintColor: "gray",
        style: {
          backgroundColor: "#fff",
          color: "#1B5357"
        },
        indicatorStyle: {
          backgroundColor: "#1e90ff"
        }
      },
      navigationOptions: {
        tabBarLabel: "ESTH",
        tabBarIcon: ({ tintColor }) =&gt; (
          &lt;Icon name="bars" color={tintColor} size={24} /&gt;
        )
      }
    }
  );
  </code></pre>
  
  <p>Here is for the StackNavigator which has code like this but it does not go to the screen2 instead screen1 of tabNavigator.</p>
  
  <pre><code>static navigationOptions = ({ navigation }) =&gt; ({
      title: "Request Service",
      headerLeft: (
        &lt;TouchableOpacity
          onPress={() =&gt; {
            () =&gt;
              navigation.dispatch(
                NavigationActions.reset({
                  index: 0,
                  actions: [
                    NavigationActions.navigate({ routeName: "MainNavigator" }) //MainNavigator is bottomNavigator
                  ]
                })
              );
            navigation.navigate("screentwo");
          }}
        &gt;
           &lt;Icon
              name="times"
              type="font-awesome"
              iconStyle={{ color: "#000" }}
              containerStyle={{ marginLeft: 16 }}
            /&gt;
        &lt;/TouchableOpacity&gt;
      ),
      headerTitleStyle: {
        color:'#00CA9D',
        fontWeight: 'bold',
      },
      headerStyle: { borderBottomWidth:0 }
  
    });
  </code></pre>
  
  <p>Thank you</p>