gpt4 book ai didi

react-native - react native 抽屉导航 : Drawer not closing when pressing an overlay

转载 作者:行者123 更新时间:2023-12-05 04:48:01 25 4
gpt4 key购买 nike

我尝试了很多来自https://github.com/react-navigation/react-navigation/issues/5370的建议但他们都没有。

抽屉在 android 平台上正常关闭。这只发生在 iOS 中。我不确定,但有 react-native-reanimatedreact-native-gesture-handler 库版本。

我也尝试按照此链接中的步骤操作。 https://reactnavigation.org/docs/getting-started/

非常感谢有人的帮助。谢谢

下面是我的包、应用程序和索引文件。

"@react-native-community/masked-view": "^0.1.11",
"@react-navigation/bottom-tabs": "^5.11.10",
"@react-navigation/drawer": "^5.12.5",
"@react-navigation/material-top-tabs": "^5.3.15",
"@react-navigation/native": "^5.9.4",
"@react-navigation/stack": "^5.14.4",
"react-native": "0.64.2",
"react-native-animatable": "^1.3.3",
"react-native-code-push": "^7.0.1",
"react-native-collapsible": "^1.6.0",
"react-native-dropdown-picker": "^5.0.0",
"react-native-fast-image": "^8.3.4",
"react-native-gesture-handler": "^1.10.3",
"react-native-get-random-values": "^1.7.0",
"react-native-haptic-feedback": "^1.11.0",
"react-native-image-picker": "^4.0.3",
"react-native-keyboard-aware-scroll-view": "^0.9.4",
"react-native-modal": "^11.10.0",
"react-native-onesignal": "^4.1.0",
"react-native-paper": "^4.8.1",
"react-native-progress": "^4.1.2",
"react-native-reanimated": "2.2.0",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "^3.1.1",
"react-native-snap-carousel": "^3.9.1",
"react-native-spinkit": "^1.5.1",
"react-native-splash-screen": "^3.2.0",
"react-native-swiper": "^1.6.0",
"react-native-switch": "^2.0.0",
"react-native-tab-view": "^2.16.0",
"react-native-vector-icons": "^8.1.0",
"sanitize-html": "^2.3.3",
"uuid": "^8.3.2"

索引.js

    import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';

AppRegistry.registerComponent(appName, () => gestureHandlerRootHOC(App));

应用程序.js第一行为 - import 'react-native-gesture-handler';

最佳答案

尝试清除 React Native 项目的缓存:
试试这个步骤:

  1. 清除守望者 watch :npm watchman watch-del-all
  2. 删除 node_modules:rm -rf node_modules 并运行 yarn install
  3. 重置 Metro 的缓存:yarn start --reset-cache
  4. 删除缓存:rm -rf/tmp/metro-*

关闭你所有的东西并重新启动你的电脑这可能会解决您的问题

关于react-native - react native 抽屉导航 : Drawer not closing when pressing an overlay,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68259260/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com