我的应用程序显示了两个标题。我只想要一个标题,我所遵循的教程工作得很好,但不是我。导师使用的是react导航v5,我使用的是v6。这是可能想要看的代码。我有三个屏幕,一个堆栈有两个屏幕,另一个有一个屏幕。请帮我修一下。
import * as React from "react";
import { createDrawerNavigator } from "@react-navigation/drawer";
import { NavigationContainer } from "@react-navigation/native";
impo
不确定发生了什么,但我的react导航并不是针对react本机的。
我已经安装了npm反应-导航-堆栈和npm安装-保存反应-本机-手势-处理程序反应-本机-恢复反应-本机-屏幕。
它给了我这个错误
Unable to resolve module 'react-navigation-stack' from 'routes/homeStack.js': react-navigation-stack could not be found within the project or these directories: ../node_modules
我的路径文件夹
在我的React Native应用程序中,我使用的是react导航版本5。 如何将导航对象传递到BottomNavigation中的场景 下面是我创建BottomNavigation的组件 import React from 'react';
import { BottomNavigation } from 'react-native-paper';
// Components
import CodeScanner from '../../../screens/vendors/CodeScannerScreen';
import Home f
我已经尝试过使用react-native导航来构建一个react-native应用程序。我已经完成了所有的设置阶段,但当我尝试运行应用程序时,我得到了以下错误:
**构建失败**
The following build commands failed:
CompileC /www/MyProject/ios/build/Build/Intermediates/ReactNativeControllers.build/Debug-iphonesimulator/ReactNativeControllers.build/Objects-normal/x86_64/RCCNavigation
我正在使用一个反应导航堆栈导航嵌入抽屉导航器。如果标题文本很长,我希望能够有两行标题文本。以下是我尝试过的:
static navigationOptions = ({ navigation }) => {
return {
title: (
<Text
numberOfLines = {2}
>
Let's see how long the title can be
</Text>