首页 > 解决方案 > @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';

标签: react-nativereact-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';

在节点模块中使用 @react-navigation/drawer 的 Finder 在此处输入图像描述


推荐阅读