Skip to content

Commit

Permalink
Merge pull request #5176 from jimfb/tweak-props-change-wording
Browse files Browse the repository at this point in the history
Tweak wording when talking about props changing
  • Loading branch information
zpao committed Oct 15, 2015
2 parents e12ee95 + c47d2cf commit ed7ab7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docs/03-interactivity-and-dynamic-uis.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ A common pattern is to create several stateless components that just render data

* **Computed data:** Don't worry about precomputing values based on state — it's easier to ensure that your UI is consistent if you do all computation within `render()`. For example, if you have an array of list items in state and you want to render the count as a string, simply render `this.state.listItems.length + ' list items'` in your `render()` method rather than storing it on state.
* **React components:** Build them in `render()` based on underlying props and state.
* **Duplicated data from props:** Try to use props as the source of truth where possible. One valid use to store props in state is to be able to know its previous values, because props can change over time.
* **Duplicated data from props:** Try to use props as the source of truth where possible. One valid use to store props in state is to be able to know its previous values, because props may change as the result of a parent component re-rendering.

0 comments on commit ed7ab7b

Please sign in to comment.