I'm assuming this was meant to say that the JSX spread syntax saves typing, not copying attributes.
This commit is contained in:
Matt Brookes
2015-10-09 14:31:59 +01:00
parent 1a7c0a4b16
commit 98aecac34c
+1 -1
View File
@@ -100,7 +100,7 @@ The result of `getDefaultProps()` will be cached and used to ensure that `this.p
## Transferring Props: A Shortcut
A common type of React component is one that extends a basic HTML element in a simple way. Often you'll want to copy any HTML attributes passed to your component to the underlying HTML element to save typing. You can use the JSX _spread_ syntax to achieve this:
A common type of React component is one that extends a basic HTML element in a simple way. Often you'll want to copy any HTML attributes passed to your component to the underlying HTML element. To save typing, you can use the JSX _spread_ syntax to achieve this:
```javascript
var CheckLink = React.createClass({