'ActionSheetIOS' 不是从 'react-native-web/dist/index' 导出的

Abd*_*rim 6 javascript reactjs react-native expo

如何避免这种警告?
我的应用程序正在运行,但它在终端中发出警告,如下所示

Compiled with warnings.
/home/karim/Desktop/React-Native/RN-Complete-Guide/node_modules/react-navigation-header- 
buttons/src/overflowMenuPressHandlers.js
Attempted import error: 'ActionSheetIOS' is not exported from 'react-native-web/dist/index'.
Run Code Online (Sandbox Code Playgroud)

这是因为我进口HeaderButtonsHeaderButtonreact-navigation-header-buttons如下图所示

import { HeaderButtons } from "react-navigation-header-buttons";
import { HeaderButton } from "react-navigation-header-buttons";
Run Code Online (Sandbox Code Playgroud)

我正在使用 react-native 4.x veriosn。
有什么办法可以避免这个警告吗?

Ale*_*mel 2

此文件react-navigation-header-buttons位于用于导入的源中ActionSheetIOSReact Native Web 应用程序不支持该文件。这看起来可能是 React Native Web 本身的问题,因为根据我过去的经验,即使ActionSheetIOS在项目中导入组件而不实际使用它也会导致崩溃。

react-navigation-header-buttons由于此问题,您可能无法使用您的解决方案。作者还在自述文件中继续说道,网络支持目前处于实验阶段:

支持 iOS 和 Android,网络支持处于实验阶段。

我建议要么找到一种方法来避免这个库,要么在存储库上标记一个问题,以建议ActionSheetIOS使用跨平台操作表解决方案(例如react-native-action-sheet.