Updated tutorial to be more clear about the dependence on the --harmony flag.
Kirk Steven Hansen committed
Jan 22, 2015 at 23:30 UTC
b4007e85b8cbe69e2a78eeac4586163b9888ab54
1 file changed
+4
docs/docs/06-transferring-props.md
+4
@@ -49,6 +49,10 @@ But what about the `name` prop? Or the `title` prop? Or `onMouseOver`?
49
50
## Transferring with `...` in JSX
51
52
+> NOTE:
53
+>
54
+> In the example below, the `--harmony ` flag is required as this is syntax is an experimental ES7 syntax. If using the in-browser JSX transformer, simply open your script with `<script type="text/jsx;harmony=true">`. See the [Rest and Spread Properties ...](http://facebook.github.io/react/docs/transferring-props.html#rest-and-spread-properties-...) section below for more details.
55
+
56
Sometimes it's fragile and tedious to pass every property along. In that case you can use [destructuring assignment](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) with rest properties to extract a set of unknown properties.
57
58
List out all the properties that you would like to consume, followed by `...other`.