Skip to content

Commit 43c6035

Browse files
author
Elise Kain
committed
minor typo fixes in README files
1 parent 2b51930 commit 43c6035

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ ReactDOM.render(
101101

102102
[demo](http://ruanyf.github.io/react-demos/demo03/) / [source](https://github.com/ruanyf/react-demos/blob/master/demo03/index.html)
103103

104-
If a JavaScript variable is array, JSX will implicitly concat all members of the array.
104+
If a JavaScript variable is an array, JSX will implicitly concat all members of the array.
105105

106106
```js
107107
var arr = [
@@ -135,7 +135,7 @@ ReactDOM.render(
135135

136136
Components would have attributes, and you can use `this.props.[attribute]` to access them, just like `this.props.name` of `<HelloMessage name="John" />` is John.
137137

138-
Please remember the first letter of the component's name must be capitalized, otherwise React will throw an error. For instance, `HelloMessage` as a component's name is OK, but `helloMessage` is not allowed. And a React component should only one top child node.
138+
Please remember the first letter of the component's name must be capitalized, otherwise React will throw an error. For instance, `HelloMessage` as a component's name is OK, but `helloMessage` is not allowed. And a React component should only have one top child node.
139139

140140
```javascript
141141
// wrong
@@ -190,7 +190,7 @@ ReactDOM.render(
190190
);
191191
```
192192

193-
Please be minded that the value of `this.props.children` has three possibilities. If the component has no children node, the value is `undefined`; If single children node, an object; If multiple children nodes, an array. You should be careful to handle it.
193+
Please be mindful that the value of `this.props.children` has three possibilities. If the component has no children node, the value is `undefined`; If single children node, an object; If multiple children nodes, an array. You should be careful to handle it.
194194

195195
React gave us an utility [`React.Children`](https://facebook.github.io/react/docs/top-level-api.html#react.children) for dealing with the `this.props.children`'s opaque data structure. You could use `React.Children.map` to iterate `this.props.children` without worring its data type being `undefined` or `object`. Check [official document](https://facebook.github.io/react/docs/top-level-api.html#react.children) for more methods `React.Children` offers.
196196

@@ -216,7 +216,7 @@ var MyTitle = React.createClass({
216216
});
217217
```
218218

219-
The above component of `Mytitle` has a props of `title`. PropTypes tells React that the title is required and its value should be string.
219+
The above component of `MyTitle` has a props of `title`. PropTypes tells React that the title is required and its value should be a string.
220220

221221
Now we give `Title` a number value.
222222

@@ -229,7 +229,7 @@ ReactDOM.render(
229229
);
230230
```
231231

232-
It means the props doesn't pass the validation, and the console will show you a error message.
232+
It means the props doesn't pass the validation, and the console will show you an error message.
233233

234234
```bash
235235
Warning: Failed propType: Invalid prop `title` of type `number` supplied to `MyTitle`, expected `string`.
@@ -285,7 +285,7 @@ ReactDOM.render(
285285
);
286286
```
287287

288-
The desired DOM node should have a `ref` attribute, and `this.refs.[refName]` would return the corresponding DOM node. Please be minded that you could do that only after this component has been mounted into the DOM, otherwise you get `null`.
288+
The desired DOM node should have a `ref` attribute, and `this.refs.[refName]` would return the corresponding DOM node. Please be mindful that you could do that only after this component has been mounted into the DOM, otherwise you get `null`.
289289

290290
## Demo08: this.state
291291

demo13/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
This demo is copied from [github.com/mhart/react-server-example](https://github.com/mhart/react-server-example), but I rewrote it with JSX syntax.
22

33
```bash
4-
# install the dependencies in demo12 directory
4+
# install the dependencies in demo13 directory
55
$ npm install
66

77
# translate all jsx file in src subdirectory to js file

0 commit comments

Comments
 (0)