D:/ react-native教程/NavigationTut/App.js找不到模块:无法解析'D:\ react-native教程\ NavigationTut']中的'react-navigation-tabs'

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

使用react-navigation v4,这是我的代码,我遇到此错误,我也检查了文档

  import React from 'react';
  import { StyleSheet, Text, View, Button } from 'react-native';
  import { createAppContainer } from 'react-navigation';
  import { createBottomTabNavigator } from 'react-navigation-tabs';
  import { Ionicons } from '@expo/vector-icons';
  import MyHomeScreen from './screen/Homescreen';
  import MyNotificationsScreen from './screen/Notification';

  const TabNavigator = createBottomTabNavigator({
  Home: MyHomeScreen,
  Notifications: MyNotificationsScreen,
  });

 const AppContainer = createAppContainer(TabNavigator);
 export default class App extends React.Component {
 render() {
  return <AppContainer />;
 }
 }
react-native react-navigation react-navigation-stack react-navigation-bottom-tab
1个回答
0
投票

请确保您连接到相同的网络,系统和移动设备应连接到相同的wifi,并且还必须升级Expo CLI。

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