我遇到过关于此的多个主题,但未能找到解决方案。其中大多数是针对网络应用程序。我非常感谢任何帮助。感谢你。
I have created a repo for my code.
"dependencies": {
"lodash": "^4.17.4",
"native-base": "^2.2.1",
"react": "16.0.0-alpha.12",
"react-native": "0.46.1",
"react-native-firebase": "^2.0.2",
"react-native-navigation": "^1.1.134",
"react-redux": "^5.0.5",
"redux": "^3.7.1",
"redux-orm": "^0.9.4",
"redux-persist": "^4.8.2",
"redux-thunk": "^2.2.0"
},
"devDependencies": {
"babel-jest": "20.0.3",
"babel-preset-react-native": "2.1.0",
"jest": "20.0.4",
"react-test-renderer": "16.0.0-alpha.12",
"redux-immutable-state-invariant": "^2.0.0",
"redux-logger": "^3.0.6",
"redux-orm-proptypes": "^0.1.0"
},
"jest": {
"preset": "react-native",
"verbose": true,
"testPathIgnorePatterns": [
"/node_modules/",
"__tests__/factories",
"__tests__/utils"
]
}
答案 0 :(得分:0)
在running again
中,您使用构造函数设置的默认src/main.js
调用<Provider>
的初始呈现,this.state.store
。
相反,创建商店并将其作为道具传递给null
组件,因此它始终具有值。或者在构造函数中创建商店(不太好,但会起作用)