我们有一个,在Jest测试中遇到了麻烦:
import React from 'react';
import { render } from '@testing-library/react-native';
import MyScreen from '../../../../../src/screens/MyScreen/index';
import Provider from '../../../../__helpers__/Provider';
import { t } from 'core/utils';
i
我正在尝试使用react导航来实现堆栈导航。当我创建一个堆栈导航const并在我的默认屏幕中调用时,它给了我这个错误。
路由'Main‘应该声明一个屏幕。例如:从‘./ MyScreen’导入MyScreen;主页:{屏幕: MyScreen,}
我的StackNavigation代码在这里
import React from 'react';
import {View, Text } from 'react-native';
import Register from './Register';
import Main from
有了新的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历史,但现在它已经变得不可能了。
打开应用程序时显示错误。
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,但是对于React/RN生态系统来说还是有点陌生,所以我可能只是误解了我所遇到的问题。
我有一个应用程序,其中很多页面的结构如下:
<View>
<NavComponent />
<View>
{/* Page component structure/logic here */}
</View>
</View>
NavComponent加载带有TouchableOpacity元素的可切换导航菜单,如下所示:
Go to Screen #1
Go to Screen
电流行为
执行应用程序后的没有安装reporting
bundling failed: Error: Unable to resolve module `
react-native-screens` from `node_modules/react-navigation-tabs/src/navigators/createBottomTabNavigator.js`: react-native-screens could not be found within the project.
您的环境
\##.软件##.#^#^
\x{e76f}反应-导航
\x{e76f}反应-原生- 0.61.
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
我直接按照世博文档中解释的步骤将React的expo从SDK25升级到了SDK32。当我试图将应用程序运行到博览客户端时,我会得到以下错误
undefined is not an object (evaluating '_expo2.default.KeepAwake') <unknown> crna-entry.js:20:17 loadModuleImplementation require.js:292:12 guardedLoadModule require.js:179:45 global code
在使用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原生应用程序,它不使用expo。我得到以下错误: React Native version mismatch.
│
│ JavaScript version: 0.57.7
│ Native version: 0.61.5
│
└ Make sure that you have re