无法从“ App.js”解析“反应导航抽屉”

问题描述 投票:0回答:1

我的反应导航抽屉不起作用,运行该应用程序时出现此错误,任何解决此问题的建议。

Unable to resolve "react-navigation-drawer" from "App.js"

import React from 'react';

import {createAppContainer} from 'react-navigation';
import {createDrawerNavigator} from 'react-navigation-drawer';
import {Dimensions} from 'react-native';

import {Feather} from 'expo/vector-icons'
import { ProfileScreen, MessageScreen, ActivityScreen, ListScreen, ReportScreen, StatisticsScreen, SignoutScreen} from './screens';

const DrawerNavigator = createDrawerNavigator({
  ProfileScreen,
  MessageScreen,
  ActivityScreen,
  ListScreen,
  ReportScreen,
  StatisticsScreen,
  SignoutScreen
})

export default createAppContainer(DrawerNavigator);
javascript reactjs react-native react-navigation react-navigation-drawer
1个回答
0
投票

您尚未在项目中安装react-navigation-drawer,并且正在尝试使用它。

在项目目录中运行yarn add react-navigation-drawer,然后它应该可以工作。

© www.soinside.com 2019 - 2024. All rights reserved.