Comments (1)
- Widget管理自己的state。
- 父widget管理子widget状态。
- 混合管理(父widget和子widget都管理状态)。
如何决定使用哪种管理方法?以下原则可以帮助你决定:
- 如果状态是用户数据,如复选框的选中状态、滑块的位置,则该状态最好由父widget管理。
- 如果状态是有关界面外观效果的,例如颜色、动画,那么状态最好由widget本身来管理。
- 如果某一个状态是不同widget共享的则最好由它们共同的父widget管理。
from noyobo.github.com.
Related Issues (13)
- WEB performance profiling
- POST template
- 阅读收藏 HOT 1
- webpack 1.x HMR hot reload 配置指南· HOT 3
- 如何修改已提交 git commit 邮箱/作者信息 HOT 1
- .travis.yml 常用配置 HOT 3
- Action required: Greenkeeper could not be activated 🚨
- electrom webview 指南 HOT 2
- 微信登录
- centos 安装 nodejs
- brew update慢,brew install慢如何解决? HOT 1
- 多端研发体系:可渐进迁移的提效之路
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from noyobo.github.com.