【问题标题】:D:/react-native tutorial/NavigationTut/App.js Module not found: Can't resolve 'react-navigation-tabs' in 'D:\react-native tutorial\NavigationTut'D:/react-native tutorial/NavigationTut/App.js Module not found: Can't resolve 'react-navigation-tabs' in 'D:\react-native tutorial\NavigationTut'
【发布时间】:2020-06-10 20:50:01
【问题描述】:

使用 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】:

    确保您连接到同一个网络,您的系统和手机应该连接到同一个 wifi,并且您必须升级您的 Expo CLI。

    【讨论】:

      猜你喜欢
      • 2021-12-02
      • 2019-01-14
      • 2019-03-11
      • 1970-01-01
      • 1970-01-01
      • 2022-10-24
      • 2019-03-11
      • 2018-05-13
      • 2020-07-13
      相关资源
      最近更新 更多