# Need help with react native/ routing

**URL:** <https://forum.freecodecamp.org/t/need-help-with-react-native-routing/383292>\
**Category:** General\
**Created:** [May 4, 2020, 1:47am UTC](https://forum.freecodecamp.org/t/need-help-with-react-native-routing/383292 "2020-05-04T01:47:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Heyrio](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/heyrio/32/54265_2.png) [@Heyrio](https://forum.freecodecamp.org/u/Heyrio)\
**Post date:** [May 4, 2020, 1:47am UTC](https://forum.freecodecamp.org/t/need-help-with-react-native-routing/383292/1 "2020-05-04T01:47:41Z")

</div>

I’m getting an error when trying to nest a drawer navigator in a switchNavigator in react navigation.  
Here is the error.

 ![Screen Shot 2020-05-03 at 8.46.28 PM](https://global.discourse-cdn.com/freecodecamp/original/3X/e/4/e48ea57b110203ea5e04de4da9532cb504658a06.jpeg)

Here is the relevant code.

```auto
import {createSwitchNavigator, createAppContainer} from "react-navigation"
import SideBar from "../App/Components/SideBar"
import createDrawerNavigator from "react-navigation-drawer";

//Components
import Login from "../App/Views/Login"
import Categories from "../App/Views/Categories"
import UserProfile from "../App/Views/UserProfile"

const BataDrawerNagivator = createDrawerNavigator({
  Dashboard: {screen: SideBar }
});

const BataNavigator = createSwitchNavigator({
    LoginScreen: Login,
    CategoriesScreen: Categories,
    UserProfileScreen: UserProfile,
    Dashboard:{ screen: BataDrawerNagivator}
  });

  export default createAppContainer(BataNavigator);

```

I’ve read through multiple resources online that have this same error but all of the answers seem to be referring to a deprecated dependency which I don’t think is the case here.

What’s interesting is each navigation works fine individually but as soon as I try to nest them it throws this err.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [June 1, 2021, 6:55pm UTC](https://forum.freecodecamp.org/t/need-help-with-react-native-routing/383292/2 "2021-06-01T18:55:53Z")

</div>

Closed on June 1, 2021, 6:55pm UTC


