React Native学习-第一篇
2015-12-07 18:46
661 查看
记录学习react native中碰到的问题。
操作系统:OS X EI Capitan 10.11.1
=========================================================================
1,具体安装参照Getting Started - React native
问题如下:
a,node版本选择:4.x系列,直接下载安装包
b,react-native init命令权限问题,参考sudo chown -R whoami /usr/local
2,安装完成,编写demo
至此HelloWorld编写完成。
=========================================================================
=========================================================================
1,程序编写完成,可将js打包到本地资源中,操作如下:
a,从本地node服务器下载编译bundle,curl http://localhost:8081/index.ios.bundle -o main.jsbundle
b,将main.jsbundle拷贝至工程文件夹,同时添加至工程,加载代码改为
2,集成至项目
a,碰到的问题“Cannot find entry file index.ios.js in any of the roots:”
只需将index.ios.js与node_modules在同一文件夹下,其它功能的js文件可随意放置,只要在index.ios.js
文件中正确引用即可
=========================================================================
=========================================================================
1,js编码工具
WebStorm
=========================================================================
操作系统:OS X EI Capitan 10.11.1
=========================================================================
1,具体安装参照Getting Started - React native
问题如下:
a,node版本选择:4.x系列,直接下载安装包
b,react-native init命令权限问题,参考sudo chown -R whoami /usr/local
2,安装完成,编写demo
至此HelloWorld编写完成。
=========================================================================
=========================================================================
1,程序编写完成,可将js打包到本地资源中,操作如下:
a,从本地node服务器下载编译bundle,curl http://localhost:8081/index.ios.bundle -o main.jsbundle
b,将main.jsbundle拷贝至工程文件夹,同时添加至工程,加载代码改为
[[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
2,集成至项目
a,碰到的问题“Cannot find entry file index.ios.js in any of the roots:”
只需将index.ios.js与node_modules在同一文件夹下,其它功能的js文件可随意放置,只要在index.ios.js
文件中正确引用即可
=========================================================================
=========================================================================
1,js编码工具
WebStorm
=========================================================================
相关文章推荐
- 一看就懂的ReactJs入门教程(精华版)
- 从jQuery到AngularJS,再到React,前端必须走在最前端
- Twisted源码分析系列01-reactor
- react native 中es6语法解析
- React js 入门总结
- React的Transaction浅析
- 玩转 React 服务器端渲染
- 优秀开发地址 (包含前段,android 性能优化 以及react native)
- 初始react
- react redux
- React-Native
- multiple reactors + thread pool(one loop per thread + threadpool)(突发I/O与密集计算)
- 从epoll构建muduo-13 Reactor + ThreadPool 成型
- pycharm集成gulp自动编译reactjs
- 从epoll构建muduo-3 加入第一个类,顺便介绍reactor
- react tab
- React Native Android 组件IntentAndroid 实现拨打电话
- AngularJS 转向 React
- IOS与ReactNative
- React简介