react-native - @react-navigation/drawer 与 react-navigation-drawer
问题描述
反应导航抽屉的以下两个导入是否等效?
React Navigation 5.x Drawer中的React 本机文档使用第二种形式的 Import。
import { createDrawerNavigator } from 'react-navigation-drawer';
import { createDrawerNavigator } from '@react-navigation/drawer';
解决方案
版本 2.5.2 的首次导入检查 npm https://www.npmjs.com/package/react-navigation-drawer
import { createDrawerNavigator } from 'react-navigation-drawer';
版本 5 的第二次导入https://www.npmjs.com/package/@react-navigation/drawer
import { createDrawerNavigator } from '@react-navigation/drawer';
推荐阅读
- keras - 用于 keras 应用程序模型的 ImageNet 测试数据集
- algorithm - 如何在没有轮询的情况下获取数据?
- javascript - Vimeo API 不适合我
- apache-httpclient-4.x - 带有 Http 和 Https 协议的 HttpGet 方法对 Https 返回响应 200,但对 Http 协议返回 404
- google-cloud-firestore - 存在对象键的 Firestore 查询文档
- c++ - 具有默认类型和值的模板参数
- sql - 从不同的行收集多个值并在 SQL 中从它们创建列
- c# - 无法在插件注册工具中调试 Dynamics C# 插件
- c# - 通过 UDP 从本地服务器更新 Unity3D 中对象的变换组件
- swift - 来自 func 的 TDD 数据未在 XCTest 案例 Swift 中返回