React class=container matters ... needs to surround all components. having components declared outside and the page will not render
Saturday, June 6, 2015
Cliff Notes for React.js Component State
- Mutate State only using the provided methods. (e.g. setState())
- In the render method retrieve properties with "this.state.varname"
https://facebook.github.io/react/docs/component-api.html
To ponder further:
"Often, it becomes clear that the proper place to "own" that state is at a higher level in the hierarchy. Placing the state there often eliminates any desire to use
And data flow is well described here:
https://github.com/facebook/flux
- Refs to include any child components as "state"
- Warned "By default, use the Reactive data flow and save
ref
s for use cases that are inherently non-reactive"
To ponder further:
"Often, it becomes clear that the proper place to "own" that state is at a higher level in the hierarchy. Placing the state there often eliminates any desire to use
ref
s to "make things happen" – instead, the data flow will usually accomplish your goal."And data flow is well described here:
https://github.com/facebook/flux
Subscribe to:
Posts (Atom)