📌  相关文章
📜  错误:`createStackNavigator()` 已移至 `react-navigation-stack`. - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:05.184000             🧑  作者: Mango

代码示例3
For the StackNavigator you have to install react-navigation-stack using:

npm i react-navigation-stack   //or yarn add react-navigation-stack

after that, go to the file where you define createStackNavigator and change:

import { createStackNavigator } from 'react-navigation'

to:

import { createStackNavigator } from 'react-navigation-stack'