From 1f0797eeb61f20a66e52e12c71e4e5d62f00713b Mon Sep 17 00:00:00 2001 From: Hou Chia Date: Mon, 21 Dec 2015 15:03:09 -0800 Subject: [PATCH] Corrects grammatical errors --- docs/thinking-in-react.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/thinking-in-react.md b/docs/thinking-in-react.md index 85cee61e..ed9e8f9e 100644 --- a/docs/thinking-in-react.md +++ b/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: