ES6 新特性
ES6 新特性
- let 和 const
- 解构赋值(数组和对象
- 扩展运算符
- 字符串(模板字符串)
- Symbol
- Set Map
- Proxy Reflect
- Promise
- Iterator 和 for of
- Generator
- async
- Class
- Decorator 装饰器
- ES Module
const {
[listType]: { infoList },
} = this.props;
const { keyword, typeId, state, listType } = this.state;
属性延申是jsx特有的;
var props = { foo: x, bar: y };
var component = <Component {...props} />;
分类一下
- 表达式:声明、解构赋值
- 内置对象:字符串扩展(includes)、数值扩展、对象扩展、数组扩展、函数扩展(箭头函数)**_、正则扩展、Symbol、Set、Map、Proxy、Reflect
- 语句与运算:Class、Module、Iterator
- 异步编程:Promise、Generator、Async_**