react native 初始化

安装

  • install babel
  • npm install --save-dev babel-cli babel-preset-latest
  • create .babelrc
  {
      "presets": ["latest"]
  }
  • install babel-polyfill
  • npm install --save-dev babel-polyfill
  • install babel preset react
  • npm install --save-dev babel-preset-react

referrence: babel(http://www.ruanyifeng.com/blog/2016/01/babel.html)

开发注意事项

  • link native module
    • react-native link react-native-audio (https://github.com/jsierles/react-native-audio/issues/89)

ios 开发注意事项

  • http请求不允许
    • 打开info.plist, 在App Transport Security Settings下添加Allow Arbitrary Loads = true

其他参考

  • Flex: http://www.ruanyifeng.com/blog/2015/07/flex-grammar.html

你可能感兴趣的:(react native 初始化)