小编Kee*_*man的帖子

如何修复此错误:检查 `DrawerNavigator` 的渲染方法

当我从注册屏幕导航到主屏幕时,出现以下错误。我在 React Native 中使用了嵌套导航。这是我的 app.js

import * as React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import  {createDrawerNavigator}  from '@react-navigation/drawer';
import Profile from './src/components/Profile';
import SignUp from './src/components/SignUp';
import LoginScreen from './src/screens/LoginScreen'
import ViewAllBooks from './src/screens/ViewAllBooks'
import Home from './src/screens/Home'




const Stack = createStackNavigator();
//  for drawer navigation
const Drawer = createDrawerNavigator();
function Root() {
  return (

      <Drawer.Navigator>
        <Drawer.Screen name="Home" component={Home} />
        
      </Drawer.Navigator>

  );
}
function App() {
  return (
    <NavigationContainer>
      <Stack.Navigator initialRouteName="signUp"> …
Run Code Online (Sandbox Code Playgroud)

react-native react-navigation react-navigation-v5 react-navigation-v6

2
推荐指数
1
解决办法
3814
查看次数

npm WARN 已弃用 tslint@6.1.2:TSLint 已被弃用,而支持 ESLint

当我运行 ng new 它显示

\ 安装包... npm WARN 已弃用 tslint@6.1.2:TSLint 已被弃用,而支持 ESLint。请参阅 https://github.com/palantir/tslint/issues/4534了解更多信息。

npm WARN deprecated request@2.88.2: request 已被弃用,见 https://github.com/request/request/issues/3142

npm WARN 已弃用 chokidar@2.1.8:Chokidar 2 将在节点 v14+ 上中断。升级到 chokidar 3,依赖项减少 15 倍。npm WARN 已弃用 fsevents@1.2.13:fsevents 1 将在节点 v14+ 上中断,并且可能使用不安全的二进制文件。升级到 fsevents 2。

npm WARN 已弃用 urix@0.1.0:请参阅 https://github.com/lydell/urix#deprecated

npm WARN 已弃用 resolve-url@0.2.1:https : //github.com/lydell/resolve-url#deprecated

npm 错误!在 '...-grunt-tasks":"^4.0.0' 附近解析时 JSON 输入意外结束

npm 错误!可以在以下位置找到此运行的完整日志:

npm 错误!
C:\Users\Abitech\AppData\Roaming\npm-cache_logs\2020-06-02T16_28_06_793Z-debug.log

× 包安装失败,见上。原理图工作流失败。看上面。

node.js angular

0
推荐指数
1
解决办法
1万
查看次数