shellzhang
2015-04-24
One of the many great parts of React is how it makes you think about apps as you build them.
single responsibility principle 单一职责原理
Try to keep as many of your components as possible stateless.
A common pattern
To create several stateless components that just render data, and have a stateful component above them in the hierarchy that passes its state to its children via props.
The stateful component encapsulates all of the interaction logic, while the stateless components take care of rendering data in a declarative way.
4. How to figure out state:
HTML is just the beginning.