Asked
Active
Viewed 6,690 times
-6

Pedram Parsian
- 3,750
- 3
- 19
- 34

Chitranshu
- 59
- 2
- 10
-
Uhh, is this a question or a statement? – Sid110307 Oct 07 '21 at 09:56
2 Answers
10
It seems like you're trying to import createDrawerNavigator()
from the react-navigation
library. However, this function has since moved to react-navigation-drawer
. The error already tells you exactly what's happening. If you take a look at the documentation this error links you, you'll find what to import:
import { createDrawerNavigator } from 'react-navigation-drawer';

Maximilian Krause
- 1,068
- 10
- 25
-
You will need to install it doing `npm i react-navigation-drawer`, as it's not a package that's automatically downloaded when installing react-navigation – Auticcat Sep 08 '19 at 15:59
-
can you check this please https://stackoverflow.com/questions/58605603/element-type-is-invalid-when-use-react-navigation-drawer – Oliver D Oct 29 '19 at 10:45
0
For starters>
For App.js imports in project or src, remove {createDrawerNavigator} from import from "react-navigation" to 'react-navigation-drawer'
ex: From => import {createDrawerNavigator, createStackNavigator, createAppContainer} from "react-navigation";
Remove => import {createStackNavigator, createAppContainer} from "react-navigation";
To => import {createDrawerNavigator} from 'react-navigation-drawer';