我正在尝试使用react导航来实现堆栈导航。当我创建一个堆栈导航const并在我的默认屏幕中调用时,它给了我这个错误。
路由'Main‘应该声明一个屏幕。例如:从‘./ MyScreen’导入MyScreen;主页:{屏幕: MyScreen,}
我的StackNavigation代码在这里
import React from 'react';
import {View, Text } from 'react-native';
import Register from './Register';
import Main from
打开应用程序时显示错误。
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in.
这是我创建的基本代码。请参阅复制步骤:
使用命令create-react-native-app Aw
有了新的react导航v5,它就不可能与react-native-web一起使用了。仅仅导入createBrowserApp就会抛出错误 import {createBrowserApp} from "@react-navigation/web"; 在@反应导航/web/dist/Link.js中显示以下错误 TypeError: (0 , _core.withNavigation) is not a function 有没有人知道如何在react-native- v5中使用react导航web?我需要路径中的url历史,但现在它已经变得不可能了。
TypeError: (0, _$$_REQUIRE(_dependencyMap[1], "@react-navigation/native").usePreventRemoveContext) is not a function. (In '(0, _$$_REQUIRE(_dependencyMap[1], "@react-navigation/native").usePreventRemoveContext)()', '(0, _$$_REQUIRE(_dependencyMap[1], "@react-navigatio
在使用createMaterialTopTabNavigator()与React导航v5进行本机反应时,我看到了以下错误:
Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or
我对react是个新手--原生、npm等。但我可以根据一些示例运行一些android应用程序的测试。
现在我想学习导航。我遵循中的步骤...
但是在我安装了react导航之后,我就不能再使用"react-native run-android“命令了。
C:\Users\Nicolas\react-native-app\KleinProject>react-native run-android
Command `run-android` unrecognized. Make sure that you have run `npm install` and that you are
我是新的反应--本地人和反应者。我正尝试在我的移动应用程序上使用React导航(v2)实现一个简单的Tab导航。
基本上有两个文件:
Router.js
// imports...
const Tabs = TabNavigator(
{
Logs: {
screen: Logs,
// here I would like to recieve the jwt and pass it as a param to the logs screen
},
NewRide: {
screen: NewRide
}
},
{navi
我有一个react原生应用程序,它不使用expo。我得到以下错误: React Native version mismatch.
│
│ JavaScript version: 0.57.7
│ Native version: 0.61.5
│
└ Make sure that you have re
我尝试使用WebView从react本机- webview,所以当我按下按钮(renderItem函数),它将打开一个由api提供的链接,但我试图使用的网页视图,从图像出现的错误。
import React, { Component } from 'react';
import api from '../services/api';
import { View, Text, FlatList, TouchableOpacity, StyleSheet } from 'react-native';
export default class M
我有这个基本的React,一旦我从react-native-router-flux导入任何东西,它就无法编译。它抛出未找到的模块:无法解析@react导航/核心
如果我取消评论行import { Router, Scene } from "react-native-router-flux";,一切都很好。我也手动做了npm install @react-navigation/core,但是没有用
import React from "react";
import { Router, Scene } from "react-native-router-fl
我试图设置一个react本机项目,在这个项目中,我只尝试用package导航在app.js中创建堆栈导航器,我遵循这个指南,然后进入,但是我得到了错误。
编译失败。D:/Visual Studio Code/Resturant Review/food/App.js模块未找到:无法解析“D:\Visual Studio Code\Resturant Review\food”中的@react导航/堆栈--这是我的代码:
//app.js
import * as React from 'react';
import { View, Text } from 'react-n
在跟随之后
(不使用博览会)
我遵循指南并通过创建Reacti-native.config.js文件禁用了自动链接。
但是当我运行react原生运行-android
error: package com.swmansion.gesturehandler.react does not exist
error: cannot find symbol
return new RNGestureHandlerEnabledRootView(MainActivity.this);
在此错误尝试将以下行添加到
**project/android/app/build.gradle**
有谁能帮我解决这个问题吗?最近我在react-native项目中工作,我想在添加代码后创建底部选项卡导航,它将显示如下错误 And these are the packages included
"dependencies": {
"@react-navigation/native": "^5.1.4",
"react": "16.9.0",
"react-native": "0.61.4",
"react-native-eleme