01 2018 档案

摘要:创建新的构建系统 Tools -> Build System -> New Build System... 输入类似的构建指令(首先清除当前的运行程序后再重新运行): 保存后,选用新的构建系统。执行构建(Ctrl + B 或者 F7),下方出现类似控制类的版块: 阅读全文
posted @ 2018-01-30 11:38 HelloHello233 阅读(207) 评论(0) 推荐(0)
摘要:https://www.html5rocks.com/en/tutorials/workers/basics/ JS的并发问题 这里有一系列的瓶颈阻止JS客户端程序变得更好,如浏览器兼容性,可访问性和性能。幸运的是这些都已经成为过去,浏览器开发商提升了JS引擎的速度。 但仍然有一个障碍,那就是JS语 阅读全文
posted @ 2018-01-24 20:22 HelloHello233 阅读(359) 评论(0) 推荐(0)
摘要:https://www.html5rocks.com/en/tutorials/appcache/beginner/ http://diveintohtml5.info/offline.html#fallback 介绍 离线web程序变得非常重要。所有的浏览器都支持长期缓存页面资源,但浏览器会为了腾 阅读全文
posted @ 2018-01-23 14:56 HelloHello233 阅读(672) 评论(0) 推荐(0)
摘要:https://developers.google.com/web/fundamentals/primers/service-workers/?hl=en 它提供了丰富的离线体验,定期的后台同步以及消息推送等技术,这些技术一般依赖于原生应用,但现在可以在web应用上使用了。 什么是service w 阅读全文
posted @ 2018-01-23 11:12 HelloHello233 阅读(555) 评论(0) 推荐(0)
摘要:https://codelabs.developers.google.com/codelabs/your-first-pwapp/#0 1.介绍 这里将使用PWA技术来构建一个天气web应用,这个app将会: 我们将会学到 我们需要什么 2.开始 下载解压以上的实例代码,然后打开静态文件服务器,以实 阅读全文
posted @ 2018-01-22 21:49 HelloHello233 阅读(502) 评论(0) 推荐(0)
摘要:https://facebook.github.io/react-native/docs/running-on-device.html 在发布之前,最好是在真实的设备上测试一下应用。如果是通过create react native app来创建的项目,可以通过Expo扫描二维码来预览我们的应用。为了 阅读全文
posted @ 2018-01-21 20:28 HelloHello233 阅读(1245) 评论(0) 推荐(0)
摘要:https://facebook.github.io/react-native/docs/performance.html 一个使用RN而不是webView的重要原因是可实现60fps以及更类似原生app的用户体验。RN的性能比较好,但某些地方仍然需要用户去手动优化 帧 打开Show Perf Mo 阅读全文
posted @ 2018-01-21 20:09 HelloHello233 阅读(1256) 评论(0) 推荐(0)
摘要:https://facebook.github.io/react-native/docs/headless-js-android.html 当app在 后台运行 时,我们可以使用RN服务来同时地刷新数据、推送或者播放音乐。 JS API 在JS中注册一个后台任务(不能操作UI,一般是网络请求、定时器 阅读全文
posted @ 2018-01-21 13:03 HelloHello233 阅读(629) 评论(0) 推荐(0)
摘要:https://facebook.github.io/react-native/docs/native-components-android.html 这里有一大堆的原生组件可以用,一些是平台自带的,另一些是第三方库的,而更多的正在其他项目中被使用。RN包装了大部分核心平台组件,但不是所有。幸运的是 阅读全文
posted @ 2018-01-20 15:26 HelloHello233 阅读(1978) 评论(0) 推荐(0)
摘要:https://facebook.github.io/react-native/docs/native-modules-android.html RN实际就是依附在原生平台上,把各种各样的RN组件展示出来。所以RN如果可以访问原生代码的话,可以实现更高的复用性,以及做一些RN做不到的事情,如多线程图 阅读全文
posted @ 2018-01-20 11:49 HelloHello233 阅读(687) 评论(0) 推荐(0)
摘要:https://facebook.github.io/react-native/docs/integration-with-existing-apps.html RN可以很好地支持往一个原生的app上添加RN的组件。通过简单的步骤,我们可以添加RN基础的特征、组件等。后面以android为例。 关键 阅读全文
posted @ 2018-01-18 15:10 HelloHello233 阅读(4618) 评论(0) 推荐(0)
摘要:https://facebook.github.io/react-native/docs/direct-manipulation.html setNativeProps可以直接修改底层native组件的属性,不与React相关(state不会跟着同步),其他原生方法还有measure、measure 阅读全文
posted @ 2018-01-18 14:35 HelloHello233 阅读(1494) 评论(0) 推荐(0)
摘要:https://facebook.github.io/react-native/docs/debugging.html 热加载 RN的目标是极致的开发体验,修改文件后能在1秒内看到变化,通过以下三个特征来实现: 有了以上功能,剩余的瓶颈就是刷新后会丢失app当前的状态,手动还原了当前要调试的状态需要 阅读全文
posted @ 2018-01-17 22:03 HelloHello233 阅读(1841) 评论(0) 推荐(0)
摘要:使用夜神 使用夜神作为模拟器,这个模拟器启动就会监听62001端口。 开发工具与模拟器的通信都是通过adb。夜神模拟器的安装目录/bin下有一个adb.exe,android sdk tools下也有一个adb.exe。必须保证两者的adb版本一致(否则两个adb进程version不一致会互相kil 阅读全文
posted @ 2018-01-16 19:02 HelloHello233 阅读(385) 评论(0) 推荐(0)
摘要:https://facebook.github.io/react-native/docs/using-a-listview.html react native类似于react,不过它使用的是原生组件,而不是web组件。也就是说不能div或span等。react native使用jsx、state、p 阅读全文
posted @ 2018-01-15 22:48 HelloHello233 阅读(169) 评论(0) 推荐(0)
摘要:https://reactjs.org/docs/react-dom-server.html https://redux.js.org/docs/recipes/ServerRendering.html redux 在客户端,也会创建一个全新的store,拿以上发送回来的state来进行store的 阅读全文
posted @ 2018-01-11 17:04 HelloHello233 阅读(264) 评论(0) 推荐(0)
摘要:参考: https://webpack.js.org/concepts/hot-module-replacement/ https://webpack.js.org/guides/hot-module-replacement/ hmr技术支持程序运行时的模块(amd、commonJS等)的修改、添加 阅读全文
posted @ 2018-01-10 19:54 HelloHello233 阅读(314) 评论(0) 推荐(0)
摘要:https://ssr.vuejs.org/zh/universal.html 基本用法 通过vue-server-renderer插件的createRenderer方法创建一个renderer,再调用这个renderer的renderToString(app),将一个带有template和data 阅读全文
posted @ 2018-01-08 16:32 HelloHello233 阅读(379) 评论(0) 推荐(0)
摘要:https://mp.weixin.qq.com/s/v1c69bJ5PxGcqt-ZU4FVXw https://juejin.im/entry/590ca74b2f301e006c10465f https://www.zhihu.com/question/32524504?sort=create 阅读全文
posted @ 2018-01-04 10:31 HelloHello233 阅读(158) 评论(0) 推荐(0)