Skip to content
#

f2e

Here are 27 public repositories matching this topic...

riskers
riskers commented Jan 18, 2019

本文发布在使用 redux 管理 flutter 应用数据,后续一直会更新,感兴趣的可以关注一下。

最近在学 flutter,边学边记录了一本 写给前端看的 flutter 笔记,感兴趣的小伙伴可以一起来完善他。


使用 redux 管理 flutter 应用数据

redux 是什么?简单来说,就是为了解决 UI 层状态管理的方案,如果不熟悉,请先看文档学习一下,今天的重点不是学习 redux,而是直接用 redux 管理 fl

ChenJiaH
ChenJiaH commented Jul 19, 2019

首发于微信公众号《前端成长记》,写于 2015.09.01

介绍

Javascript中有一些常见易混淆的属性,下面我做了一份大概的整理。

混淆属性

document.body.clientWidth 网页可见区域宽

document.body.offsetWidth 网页可见区域宽(包括边线的宽)

document.body.offsetHieght 网页可见区域高(包括边线的高)

document.body.scrollWidth 网页正文全文宽

document.body.scrollHieght 网页正文全文高

document.body.scrollTop 网页被卷去的高

document.body.scrollLeft 网页被卷去的左

**w

Clearives
Clearives commented Dec 12, 2019

mobx 使用

observable

将 JS 基本数据类型、引用类型、普通对象、类实例、数组和映射,转换为可观察数据

action

用来修改 observable 的数据的动作,只有 action 和 runInAction 才能修改 observable

@action 和@action.bound

  • @action 保留原始函数的绑定和原型包含。 如果原始函数未绑定,则结果不会,反之亦然。 如果原始函数不在原型中,结果将不会,反之亦然。
  • @action.bound 将始终生成一个绑定的函数,该函数位于原型中。

runInAction

用来在异步的时候执行修改 observable 的数据的动作。例如网络请求后修改数据,这种模式的优势是它鼓励你不要到处写 action,而是在整个过程结束时尽可能多地对所

Improve this page

Add a description, image, and links to the f2e topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the f2e topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.