admin管理员组文章数量:1022853
How to avoid the this kind of warning?
My app is working but it gives warning in terminal like below
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'.
It is because of of I imported HeaderButtons
and HeaderButton
from react-navigation-header-buttons
like below
import { HeaderButtons } from "react-navigation-header-buttons";
import { HeaderButton } from "react-navigation-header-buttons";
And I am using react-native 4.x veriosn.
is there any way to avoid this warning?
How to avoid the this kind of warning?
My app is working but it gives warning in terminal like below
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'.
It is because of of I imported HeaderButtons
and HeaderButton
from react-navigation-header-buttons
like below
import { HeaderButtons } from "react-navigation-header-buttons";
import { HeaderButton } from "react-navigation-header-buttons";
And I am using react-native 4.x veriosn.
is there any way to avoid this warning?
2 Answers
Reset to default 2This file in the source for react-navigation-header-buttons
imports ActionSheetIOS
, which is not supported by React Native web applications. This seems like it's probably an issue with React Native web itself, as even importing the ActionSheetIOS
ponent in your project without actually using it will cause a crash from my past experience.
You probably won't be able to use react-navigation-header-buttons
for your solution because of this issue. The authors also go on to say in their README that web support is currently experimental:
Supports iOS and Android, web support is experimental.
I'd suggesting either finding a way to avoid this library or flag an issue on the repo to suggest swapping ActionSheetIOS
in with a cross-platform action sheet solution like react-native-action-sheet
.
in react-native-web/dist/index.js i exported export { ActionSheetIOS }; and somehow the warning disappeared
How to avoid the this kind of warning?
My app is working but it gives warning in terminal like below
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'.
It is because of of I imported HeaderButtons
and HeaderButton
from react-navigation-header-buttons
like below
import { HeaderButtons } from "react-navigation-header-buttons";
import { HeaderButton } from "react-navigation-header-buttons";
And I am using react-native 4.x veriosn.
is there any way to avoid this warning?
How to avoid the this kind of warning?
My app is working but it gives warning in terminal like below
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'.
It is because of of I imported HeaderButtons
and HeaderButton
from react-navigation-header-buttons
like below
import { HeaderButtons } from "react-navigation-header-buttons";
import { HeaderButton } from "react-navigation-header-buttons";
And I am using react-native 4.x veriosn.
is there any way to avoid this warning?
2 Answers
Reset to default 2This file in the source for react-navigation-header-buttons
imports ActionSheetIOS
, which is not supported by React Native web applications. This seems like it's probably an issue with React Native web itself, as even importing the ActionSheetIOS
ponent in your project without actually using it will cause a crash from my past experience.
You probably won't be able to use react-navigation-header-buttons
for your solution because of this issue. The authors also go on to say in their README that web support is currently experimental:
Supports iOS and Android, web support is experimental.
I'd suggesting either finding a way to avoid this library or flag an issue on the repo to suggest swapping ActionSheetIOS
in with a cross-platform action sheet solution like react-native-action-sheet
.
in react-native-web/dist/index.js i exported export { ActionSheetIOS }; and somehow the warning disappeared
本文标签: javascript39ActionSheetIOS39 is not exported from 39reactnativewebdistindex39Stack Overflow
版权声明:本文标题:javascript - 'ActionSheetIOS' is not exported from 'react-native-webdistindex' - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745501661a2153420.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论