Skip to content

Commit 39ef13f

Browse files
authored
edit for grammar
1 parent 8ccb0c4 commit 39ef13f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

content/docs/jsx-in-depth.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,7 @@ function App2() {
245245
}
246246
```
247247

248-
You can also pick specific props that your component will consume while passing all other props using the spread operator.
249-
This ensures that the component consumes the `kind` prop only, and passes down all other props via `...other`.
248+
You can also pick specific props that your component will consume while passing all other props using the spread operator.
250249

251250
```js{2}
252251
const Button = props => {
@@ -266,10 +265,10 @@ const App = () => {
266265
};
267266
```
268267

269-
In the example above, the `kind` prop is safely consumed and *is not* passed directly to the `<button>` element in the DOM.
268+
In the example above, the `kind` prop is safely consumed and *is not* passed on to the `<button>` element in the DOM.
270269
All other props are passed via the `...other` object making this component really flexible. You can see that it passes an `onClick` and `children` props.
271270

272-
Spread attributes can be useful but not to pass invalid HTML attributes to the DOM. They can also make your code messy by making it easy to pass a lot of irrelevant props to components that don't care about them. We recommend using this syntax sparingly.
271+
Spread attributes can be useful but they also make it easy to pass unnecessary props to components that don't care about them or to pass invalid HTML attributes to the DOM. We recommend using this syntax sparingly.
273272

274273
## Children in JSX
275274

0 commit comments

Comments
 (0)