nihgwu/react-native-dva-starter

Hope to support react-native 0.56

fzdm opened this issue · 3 comments

fzdm commented

Hi,There are many problems in the current version of react-native upgrade version 0.56.

i have upgraded successfully.there are three steps:

  1. upgrade with react-native-git-upgrade
react-native-git-upgrade 0.56.0
  1. modify package.json && .babelrc

package.json

{
  "devDependencies": {
      "@babel/plugin-proposal-decorators": "7.0.0-beta.47",
      "babel-preset-react-native": "^5.0.0",
  }
}

.babelrc

{
  "presets": ["react-native"],
  "plugins": [
    ["@babel/plugin-proposal-decorators", { "legacy": true }],
  ]
}
  1. run app
rm -rf $TMPDIR/react-* && watchman watch-del-all && rm -rf ios/build && rm -rf node_modules/ && npm cache clean --force && yarn install

react-native run-ios

@gatspy
Good job, It saves me a lot of time.

closed via #76