React Native | Navigator talking back to Initial Page

enter image description here

I have this navigator Setup on my Routes Page and I am expecting that when I press this.props.navigation.goback function it should take me to the second page if I am on the third page but apparently it is taking me to the first page.

Even with the natural goback Behavior of Android or IOS, it’s taking me to the First Page.

I navigate Via

this.props.navigation.navigate('Screens')

NavigatorPage: Here I am using DrawerNavigator

import {   createAppContainer ,createDrawerNavigator} from 'react-navigation';
import Dashboard from './pages/dashboard';
import Splash from './pages/Splash';
import Readmore from './pages/readmore';
import Tabs from './pages/tab';
import Check from './pages/checking';
import Search from './pages/searchpage';
import SideMenu from './componenet/sideMenu'
const AppNavigator = createDrawerNavigator({
 // Prac: { screen:  Check},
 Splash :{ screen:  Splash},
  Dashboard: { screen:  Dashboard},
    Readmore: { screen: Readmore },
    Tabs: { screen: Tabs },
    Search: { screen: Search }
  },
  {
    contentComponent: SideMenu,
    drawerWidth: 300,
    headerMode: 'none',
    navigationOptions: {
      headerVisible: false,
    }
   });
  export default createAppContainer(AppNavigator);

Edit ONE After doing this

    const AppNavigator = createDrawerNavigator({
 // Prac: { screen:  Check},
 stacknav:{screen:stacknav}

  },
  {
    contentComponent: SideMenu,
    drawerWidth: 300,
    headerMode: 'none',
    navigationOptions: {
      headerVisible: false,
    }
   });

   const stacknav = createStackNavigator ({   Splash :{ screen:  Splash},
    Dashboard: { screen:  Dashboard},
      Readmore: { screen: Readmore },
      Tabs: { screen: Tabs },
      Search: { screen: Search } });



  export default createAppContainer(AppNavigator);

Getting an Error of this Error

Answer

I have found the solution and before that, there are some things that we need to watch. Make sure every const Name start with Capital Letter I couldn’t just simply import the stack navigator to the drawer navigator from the same file. So I put the stack into another file and export default it directly into my Drawernavigator. And that fixed my issue