-6

createDrawerNavigation() 已移至 react-navigation-drawer。有关更多详细信息,请参阅 https://reactnavigation.org/docs/4.x/drawer-navigator.html

4

2 回答 2

10

您似乎正在尝试createDrawerNavigator()react-navigation库中导入。但是,此功能已移至react-navigation-drawer. 该错误已经告诉你到底发生了什么。如果您查看此错误链接您的文档,您会发现要导入的内容:

import { createDrawerNavigator } from 'react-navigation-drawer'; 
于 2019-09-08T09:57:54.667 回答
0

初学者>

对于项目或 src 中的 App.js 导入,从“react-navigation”到“react-navigation-drawer”的导入中删除 {createDrawerNavigator}

例如:From => import { createDrawerNavigator, createStackNavigator, createAppContainer} from "react-navigation";

从“react-navigation”中删除 => import {createStackNavigator, createAppContainer};

To => import { createDrawerNavigator } from 'react-navigation-drawer';

于 2019-12-06T15:58:37.850 回答