Browse Source

Added missing comma and removed a few redundant words (#3725)

main
Luke Ingalls 4 years ago
committed by GitHub
parent
commit
68e4efcf93
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      content/docs/forms.md
  2. 2
      content/docs/hello-world.md
  3. 2
      content/docs/lists-and-keys.md
  4. 2
      content/docs/thinking-in-react.md

2
content/docs/forms.md

@ -9,7 +9,7 @@ redirect_from:
- "docs/forms-zh-CN.html"
---
HTML form elements work a little bit differently from other DOM elements in React, because form elements naturally keep some internal state. For example, this form in plain HTML accepts a single name:
HTML form elements work a bit differently from other DOM elements in React, because form elements naturally keep some internal state. For example, this form in plain HTML accepts a single name:
```html
<form>

2
content/docs/hello-world.md

@ -40,7 +40,7 @@ React is a JavaScript library, and so we'll assume you have a basic understandin
>Note
>
>This guide occasionally uses some of the newer JavaScript syntax in the examples. If you haven't worked with JavaScript in the last few years, [these three points](https://gist.github.com/gaearon/683e676101005de0add59e8bb345340c) should get you most of the way.
>This guide occasionally uses some newer JavaScript syntax in the examples. If you haven't worked with JavaScript in the last few years, [these three points](https://gist.github.com/gaearon/683e676101005de0add59e8bb345340c) should get you most of the way.
## Let's Get Started! {#lets-get-started}

2
content/docs/lists-and-keys.md

@ -207,7 +207,7 @@ A good rule of thumb is that elements inside the `map()` call need keys.
### Keys Must Only Be Unique Among Siblings {#keys-must-only-be-unique-among-siblings}
Keys used within arrays should be unique among their siblings. However they don't need to be globally unique. We can use the same keys when we produce two different arrays:
Keys used within arrays should be unique among their siblings. However, they don't need to be globally unique. We can use the same keys when we produce two different arrays:
```js{2,5,11,12,19,21}
function Blog(props) {

2
content/docs/thinking-in-react.md

@ -84,7 +84,7 @@ To make your UI interactive, you need to be able to trigger changes to your unde
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*](https://en.wikipedia.org/wiki/Don%27t_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, 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, take the length of the TODO items array.
Think of all of the pieces of data in our example application. We have:
Think of all the pieces of data in our example application. We have:
* The original list of products
* The search text the user has entered

Loading…
Cancel
Save