react-native开发
文章平均质量分 89
XiaooSe
从事于web前端开发,热爱健身,程序员中的撸铁者。勇于尝试,驾驭人生。
展开
-
react-native 在debugger调试模式下运行正常,非debugger模式不正常
多数原因:在debugger调试模式下,我们经常会打印诸多的东西,来查看结果是否正确,在debugger模式下正常,却在非debugger模式下出现异常解决方案:删除多余的console.log()或者在项目最初始添加:if (!__DEV__) { global.console = { log: () => { }, warn: () => { }, info: ...原创 2020-01-29 17:13:28 · 1568 阅读 · 2 评论 -
idea(2018.1.4版本)创建react-native项目,windows、android真机测试以及安卓夜神模拟器测试运行
在初识react-native项目上,因为个人从事前后端的开发,使用idea比较方便,环境搭建下载node.js 网址:https://nodejs.org/en/ 安装完成后,进入cmd命令行窗口,输入 node -v和npm -v; 备注:如若出现node不是内部程序等错误,检查及添加环境变量,如若环境变量没问题; 小窍门:重启电脑下面其...原创 2018-09-04 11:46:25 · 2659 阅读 · 1 评论 -
react-native-modal-translucent\scripts\translucent not find
解决方案 npm install react-native-modal-translucent --save react-native link react-native-modal-translucentgithub地址https://github.com/listenzz/react-native-modal-translucent原创 2019-04-24 19:25:28 · 545 阅读 · 0 评论 -
fetch与Promise实战应用
fetch基于Promise进行设计的,用于同Ajax发起获取资源的请求,返回一个promise。example: 模拟登录post请求react-native绑定点击登陆事件 <Button onPress={this.LogIn}> <Text>登录/注册</Text> </Button方法1 es6箭头函数实现 LogIn...原创 2019-04-25 14:07:28 · 527 阅读 · 0 评论 -
react native底部View会有间隙,没有贴合手机屏幕底端
查找原因原因: 因为对宽度、高度做了一些计算变换,使其在每个手机型号上的显示效果都能一致,所以在使用borderRadius: cx(12) 会出现小数,导致不能贴合。解决方案: 将borderRadius进行取整。...原创 2019-09-04 10:10:05 · 775 阅读 · 0 评论 -
mbox整合多个store
1.store/index.js (根store)// 整合两个storeimport NativeStore from './nativeStore';import IpcStore from './ipcStore';const nativeStore = new NativeStore();const ipcStore = new IpcStore();export defa...原创 2019-09-04 11:05:34 · 1305 阅读 · 0 评论