我创建了一个React Native App。目前,我刚刚创建了应用程序的视图,目前还没有redux。一切都是硬编码的。我主要使用卡片,网格,列表视图。
我在整个应用中使用native-base
进行设计。我也包含SideMenu,它是使用Native Base的Drawer创建的。
我正在使用react-native-router-flux
进行导航。
我正在使用react native 0.52.2
。
当我在页面上保留卡片,网格,ListView时,我的应用程序工作非常缓慢(需要大约2-3秒才能导航)。如果我删除这些&只需使用按钮或侧面菜单在页面之间导航,应用程序正常工作。我在Android和Android中测试了App iOS真实设备&在两个平台上都有发布版本。
下面是我的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/"
]
}
}