Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native React本机应用程序导航工作非常缓慢_React Native_React Native Router Flux_Native Base - Fatal编程技术网

React native React本机应用程序导航工作非常缓慢

React native React本机应用程序导航工作非常缓慢,react-native,react-native-router-flux,native-base,React Native,React Native Router Flux,Native Base,我已经创建了一个React原生应用程序。目前,我刚刚创建了应用程序的视图,到目前为止还没有redux。一切都是硬编码的。我主要使用卡片、网格、列表视图 我在整个应用程序中使用native base进行设计。我还包含了我使用本机Base的Drawer创建的侧菜单 我正在使用react native router flux进行导航 我使用的是react native 0.52.2 当我在页面上保留卡片、网格和列表视图时,我的应用程序运行非常慢(导航大约需要2-3秒)。如果我删除这些&只需使用按钮或侧

我已经创建了一个React原生应用程序。目前,我刚刚创建了应用程序的视图,到目前为止还没有redux。一切都是硬编码的。我主要使用卡片、网格、列表视图

我在整个应用程序中使用
native base
进行设计。我还包含了我使用本机Base的Drawer创建的侧菜单

我正在使用
react native router flux
进行导航

我使用的是
react native 0.52.2

当我在页面上保留卡片、网格和列表视图时,我的应用程序运行非常慢(导航大约需要2-3秒)。如果我删除这些&只需使用按钮或侧边菜单在页面之间导航,应用程序工作正常。我已经在Android和iOS real设备上测试了这个应用程序,并在这两个平台上进行了版本构建

下面是my package.json:

    {
      "name": "Test",
      "version": "0.0.1",
      "private": true,
      "scripts": {
        "start": "node node_modules/react-native/local-cli/cli.js start",
        "test": "jest"
      },
      "dependencies": {
        "axios": "^0.17.1",
        "lodash": "^4.17.4",
        "native-base": "^2.3.5",
        "react": "16.2.0",
        "react-native": "0.52.2",
        "react-native-action-button": "^2.8.4",
        "react-native-datepicker": "^1.6.0",
        "react-native-easy-grid": "^0.1.17",
        "react-native-modal": "^5.0.0",
        "react-native-router-flux": "^4.0.0-beta.28",
        "react-native-splash-screen": "^3.0.6",
        "react-native-table-component": "^1.1.3",
        "react-native-vector-icons": "^4.5.0",
        "react-redux": "^5.0.6",
        "redux": "^3.7.2",
        "redux-thunk": "^2.2.0"
      },
      "devDependencies": {
        "babel-jest": "22.1.0",
        "babel-preset-react-native": "4.0.0",
        "jest": "22.1.4",
        "react-test-renderer": "16.2.0"
      },
      "jest": {
        "preset": "react-native"
      },
      "rnpm": {
        "assets": [
          "./assets/fonts/"
        ]
      }
    }

在屏幕显示之前,使用InteractionManager防止加载卡和数据。显示模拟元素(就像Facebook一样)直到页面显示如果您想要快速导航,请使用wix的react导航。为了防止缓慢,您可以删除所有console.log并使用更纯的组件。