Browse Source

Rest/Spread Properties may not be part of ES7

According to the http://www.2ality.com/2015/11/tc39-process.html it is
not a good idea to guess target ES version until the proposal reaches
later phases.

Even the proposal repository now states
  > It is a Stage 2 proposal for ECMAScript. <
(it has been changed in e9813ac78a)
main
Martin Hujer 9 years ago
parent
commit
981d6d0814
  1. 2
      docs/02.2-jsx-spread.md
  2. 4
      docs/06-transferring-props.md

2
docs/02.2-jsx-spread.md

@ -49,4 +49,4 @@ You can use this multiple times or combine it with other attributes. The specifi
## What's with the weird `...` notation?
The `...` operator (or spread operator) is already supported for [arrays in ES6](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator). There is also an ES7 proposal for [Object Rest and Spread Properties](https://github.com/sebmarkbage/ecmascript-rest-spread). We're taking advantage of these supported and developing standards in order to provide a cleaner syntax in JSX.
The `...` operator (or spread operator) is already supported for [arrays in ES6](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator). There is also an ECMAScript proposal for [Object Rest and Spread Properties](https://github.com/sebmarkbage/ecmascript-rest-spread). We're taking advantage of these supported and developing standards in order to provide a cleaner syntax in JSX.

4
docs/06-transferring-props.md

@ -20,7 +20,7 @@ If you don't use JSX, you can use any object helper such as ES6 `Object.assign`
React.createElement(Component, Object.assign({}, this.props, { more: 'values' }));
```
The rest of this tutorial explains best practices. It uses JSX and experimental ES7 syntax.
The rest of this tutorial explains best practices. It uses JSX and experimental ECMAScript syntax.
## Manual Transfer
@ -132,7 +132,7 @@ var FancyCheckbox = React.createClass({
Rest properties allow you to extract the remaining properties from an object into a new object. It excludes every other property listed in the destructuring pattern.
This is an experimental implementation of an [ES7 proposal](https://github.com/sebmarkbage/ecmascript-rest-spread).
This is an experimental implementation of an [ECMAScript proposal](https://github.com/sebmarkbage/ecmascript-rest-spread).
```javascript
var { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 };

Loading…
Cancel
Save