React native-初识native

作者: abbcea03a430 | 来源:发表于2017-05-15 16:46 被阅读7次

一 学习网站:

https://facebook.github.io/react-native     rn官网

http://reactnative.cn/docs/0.42/getting-started.html  rn中文网

二 安装rn环境

http://reactnative.cn/docs/0.42/getting-started.html  rn中文网

三 命令

xcode模拟器:Cmd+R刷新  ,Cmd+D调出菜单

安卓模拟器:双击R刷新,Cmd+M调出菜单

杂七杂八

用谷歌调试rn项目,需要安装React Developer tools的扩展插件

打断点

1.在谷歌中打断点

2.在代码中写 debugger可以打断点

3.使用Nuclide调试步骤:

1.安装Nuclide-点击Nuclide-选react-native-start packager,

2.然后使用react-native run-ios运行项目

3.然后使用cmd+shift+p快捷键搜索(搜索内容如下图):

inspector

4.打开模拟器,打开Debug JS Remotely,然后看到下图就成功了

相关文章

网友评论

    本文标题:React native-初识native

    本文链接:https://www.haomeiwen.com/subject/ctgcxxtx.html