From 04fac68f10973b362e737197f8ac8b1850e07eef Mon Sep 17 00:00:00 2001 From: Tsung Hung Date: Mon, 4 May 2015 16:26:14 -0700 Subject: [PATCH] updated some typos, grammers, and made sentences sound better --- docs/02-displaying-data.md | 4 ++-- docs/02.2-jsx-spread.md | 2 +- docs/04-multiple-components.md | 2 +- docs/05-reusable-components.md | 4 ++-- docs/06-transferring-props.md | 8 ++++---- docs/08.1-more-about-refs.md | 8 ++++---- docs/10-addons.md | 2 +- docs/10.1-animation.md | 2 +- docs/10.2-form-input-binding-sugar.md | 2 +- docs/10.7-update.md | 2 +- docs/11-advanced-performance.md | 12 ++++++------ docs/thinking-in-react.md | 12 ++++++------ docs/tutorial.md | 2 +- 13 files changed, 31 insertions(+), 31 deletions(-) diff --git a/docs/02-displaying-data.md b/docs/02-displaying-data.md index 8e7df7491..e3d003876 100644 --- a/docs/02-displaying-data.md +++ b/docs/02-displaying-data.md @@ -66,7 +66,7 @@ The inputs to this component are called `props` — short for "properties". They ## Components are Just Like Functions -React components are very simple. You can think of them as simple functions that take in `props` and `state` (discussed later) and render HTML. Because they're so simple, it makes them very easy to reason about. +React components are very simple. You can think of them as simple functions that take in `props` and `state` (discussed later) and render HTML. With this in mind, components are easy to reason about. > Note: > @@ -109,7 +109,7 @@ var root = React.createElement('ul', { className: 'my-list' }, child1, child2); React.render(root, document.getElementById('example')); ``` -As a convenience you can create short-hand factory functions to create elements from custom components. +For convenience, you can create short-hand factory functions to create elements from custom components. ```javascript var Factory = React.createFactory(ComponentClass); diff --git a/docs/02.2-jsx-spread.md b/docs/02.2-jsx-spread.md index 76597d592..4b6f46594 100644 --- a/docs/02.2-jsx-spread.md +++ b/docs/02.2-jsx-spread.md @@ -24,7 +24,7 @@ If you don't know which properties you want to set, you might be tempted to add This is an anti-pattern because it means that we can't help you check the right propTypes until way later. This means that your propTypes errors end up with a cryptic stack trace. -The props should be considered immutable at this point. Mutating the props object somewhere else could cause unexpected consequences so ideally it would be a frozen object at this point. +The props should be considered immutable. Mutating the props object somewhere else could cause unexpected consequences so ideally it would be a frozen object at this point. ## Spread Attributes diff --git a/docs/04-multiple-components.md b/docs/04-multiple-components.md index d6e6c220e..585142c9f 100644 --- a/docs/04-multiple-components.md +++ b/docs/04-multiple-components.md @@ -180,7 +180,7 @@ In React, data flows from owner to owned component through `props` as discussed ## A Note on Performance -You may be thinking that it's expensive to react to changing data if there are a large number of nodes under an owner. The good news is that JavaScript is fast and `render()` methods tend to be quite simple, so in most applications this is extremely fast. Additionally, the bottleneck is almost always the DOM mutation and not JS execution and React will optimize this for you using batching and change detection. +You may be thinking that it's expensive to change data if there are a large number of nodes under an owner. The good news is that JavaScript is fast and `render()` methods tend to be quite simple, so in most applications this is extremely fast. Additionally, the bottleneck is almost always the DOM mutation and not JS execution. React will optimize this for you using batching and change detection. However, sometimes you really want to have fine-grained control over your performance. In that case, simply override `shouldComponentUpdate()` to return false when you want React to skip processing of a subtree. See [the React reference docs](/react/docs/component-specs.html) for more information. diff --git a/docs/05-reusable-components.md b/docs/05-reusable-components.md index 49a552e4c..e0a6d7ece 100644 --- a/docs/05-reusable-components.md +++ b/docs/05-reusable-components.md @@ -6,7 +6,7 @@ prev: multiple-components.html next: transferring-props.html --- -When designing interfaces, break down the common design elements (buttons, form fields, layout components, etc) into reusable components with well-defined interfaces. That way, the next time you need to build some UI you can write much less code, which means faster development time, fewer bugs, and fewer bytes down the wire. +When designing interfaces, break down the common design elements (buttons, form fields, layout components, etc.) into reusable components with well-defined interfaces. That way, the next time you need to build some UI, you can write much less code. This means faster development time, fewer bugs, and fewer bytes down the wire. ## Prop Validation @@ -227,7 +227,7 @@ Counter.defaultProps = { initialCount: 0 }; ### No Autobinding -Methods follow the same semantics as regular ES6 classes, meaning that they don't automatically bind `this` to the instance. You'll have to explicitly use `.bind(this)` or arrow functions. +Methods follow the same semantics as regular ES6 classes, meaning that they don't automatically bind `this` to the instance. You'll have to explicitly use `.bind(this)` or [arrow functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions) `=>`. ### No Mixins diff --git a/docs/06-transferring-props.md b/docs/06-transferring-props.md index 7fa9609b1..0ccd69634 100644 --- a/docs/06-transferring-props.md +++ b/docs/06-transferring-props.md @@ -50,7 +50,7 @@ But what about the `name` prop? Or the `title` prop? Or `onMouseOver`? ## Transferring with `...` in JSX > NOTE: -> +> > In the example below, the `--harmony ` flag is required as this syntax is an experimental ES7 syntax. If using the in-browser JSX transformer, simply open your script with `