
ReactNative
rn_android_lf
这个作者很懒,什么都没留下…
展开
-
reactNative Navigator导航组件
这个东西应该和android activity 栈关联起来思考:方法:getCurrentRoutes() 该进行返回存在的路由列表信息 jumpBack() 该进行回退操作 但是该不会卸载(删除)当前的页面jumpForward() 进行跳转到相当于当前页面的下一个页面jumpTo(route) 根据传入的一个路由信息,跳转到一个指定的页面(原创 2017-01-19 16:10:48 · 488 阅读 · 0 评论 -
ReactNative重构之前的android项目
这篇梳理一下这么用rn 写布局,之前习惯了用xml;1.rn长度默认对应dp:来谈谈:px,pt,ppi,dpi,dp,sp;px:pixel,像素,电子屏幕上组成一幅图画或照片的最基本单元pt: point,点,印刷行业常用单位,等于1/72英寸ppi: pixel per inch,图像分辨率,每英寸像素数,该值越高,则屏幕越细腻dpi: dot per i原创 2017-01-19 14:53:46 · 546 阅读 · 0 评论 -
reactNative Could not connect to development server解决思路
1.8081.端口占用,关掉重启 1.cmd查找端口占用:netstat -ano 找出8081对应的pid,2.任务管理器,杀掉对应pid的进程(node.exe)注:http://localhost:8081/index.android.bundle?platform=android,本地服务器2.不是一个wifi环境,..............原创 2017-01-19 14:38:05 · 1637 阅读 · 0 评论 -
javascript===和==,xml中<></>和</>区别
1.==用于一般比较,===用于严格比较,==在比较的时候可以转换数据类型,===严格比较,只要类型不匹配就返回flase。举例说明:"1" == true类型不同,"=="将先做类型转换,把true转换为1,即为 "1" == 1;此时,类型仍不同,继续进行类型转换,把"1"转换为1,即为 1 == 1;此时,"==" 左右两边的类型都为数值型,比较成功!如果原创 2017-01-19 14:20:32 · 648 阅读 · 0 评论 -
es6扩展运算符 三个点(...)
1 含义扩展运算符( spread )是三个点(...)。它好比 rest 参数的逆运算,将一个数组转为用逗号分隔的参数序列。[javascript] view plain copy console.log(...[1, 2, 3]) // 1 2 3 console.log(1, ...[2, 3, 4], 5)转载 2017-01-19 14:04:54 · 3751 阅读 · 0 评论 -
ReactNative组件生命周期
实例化首次实例化getDefaultPropsgetInitialStatecomponentWillMountrendercomponentDidMount实例化完成后的更新getInitialStatecomponentWillMountrendercomponentDidMount存在期组件已存在时的状态改变componentWillR原创 2017-01-19 11:44:55 · 313 阅读 · 0 评论 -
reactNative 代码理解
1.构造器中方法bind(this),原因:React默认不会自动绑定类中的方法造成2.const { navigator } = this.props; 这一句是以props传递过来的navigator进行接收。得到Navigator组件,可以利用其 push 与pop两个函数进行切换下一页面与回到上个页面操作。3.几个经常用的指令:流程:(1)启动本地服务器:npm sta原创 2017-01-19 11:18:20 · 288 阅读 · 0 评论 -
reactNative bug
Unable to resolve module xxxxx from Module does not exist in the module map or in these directories:出现这个问题,最后解决方法:要跳转至的页面,别直接export default class;先建class,最后再export default,问题解决,原因,待探究。原创 2017-01-19 11:06:11 · 247 阅读 · 0 评论