From 7bb2119733cfcb5ca18ec9f20988839724684817 Mon Sep 17 00:00:00 2001 From: Jim Date: Mon, 21 Dec 2015 16:28:34 -0800 Subject: [PATCH] Merge pull request #5708 from kchia/patch-4 Corrects grammatical errors in tutorial (cherry picked from commit 88ce0fc95f87bfd25017d8ed09078293fd23fd56) --- docs/docs/thinking-in-react.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/thinking-in-react.md b/docs/docs/thinking-in-react.md index 85cee61e0c..ed9e8f9ee7 100644 --- a/docs/docs/thinking-in-react.md +++ b/docs/docs/thinking-in-react.md @@ -81,7 +81,7 @@ There are two types of "model" data in React: props and state. It's important to To make your UI interactive, you need to be able to trigger changes to your underlying data model. React makes this easy with **state**. -To build your app correctly, you first need to think of the minimal set of mutable state that your app needs. The key here is DRY: *Don't Repeat Yourself*. Figure out what the absolute minimal representation of the state of your application needs to be and compute everything else you need on-demand. For example, if you're building a TODO list, just keep an array of the TODO items around; don't keep a separate state variable for the count. Instead, when you want to render the TODO count, simply take the length of the TODO items array. +To build your app correctly, you first need to think of the minimal set of mutable state that your app needs. The key here is DRY: *Don't Repeat Yourself*. Figure out the absolute minimal representation of the state your application needs and compute everything else you need on-demand. For example, if you're building a TODO list, just keep an array of the TODO items around; don't keep a separate state variable for the count. Instead, when you want to render the TODO count, simply take the length of the TODO items array. Think of all of the pieces of data in our example application. We have: