問題1:
warning:setState(...): Cannot update during an existing state transition (such as within `render` or another component's constructor). Render methods should be a pure function of props and state; constructor side-effects are an anti-pattern, but can be moved to `componentWillMount`
參考這個進行修改:
https://stackoverflow.com/questions/39198944/react-native-redux-setstate-cannot-update-during-an-existing-state-transit
問題2:
warning:Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}),原因是fsevent是在macOS下的依賴包,當前是64位win系統(tǒng)抗俄,因此只報warning信息葫松,此處是因為fsevents是適用于mac的,os是指操作系統(tǒng)生年,arch是體系結構;并沒什么影響,運行時如果說是windows或者Linux巷疼,會直接跳過他的,
its not an error.its a MAC OS Specified, running onwindowsorLinuxshow this warning,this the only reason it is showing this warning, you can skip it..
問題3:
Bundling `index.android.js`? [development, non-minified, hmr disabled]? 0.0% (0/1), failed.
error: bundling failed: "TransformError: D:\\AA\\fff\\index.android.js: Unexpected token ) (While processing preset: \"D:\\\\AA\\\\fff\\\\node_modules\\\\babel-preset-react-native\\\\index.js\")"
參考此處進行修改:
https://github.com/facebook/react-native/issues/15513
主要是React-native@0.47.1版本中的babel-preset-react-native@3.0.0版本的問題,所以把其換為2.1.0版本進行使用支持嚼沿,
yarn remove babel-preset-react-native
yarn add babel-preset-react-native@2.1.0