react-with-es6
react-with-es6 copied to clipboard
atom使用教程、es6、jsx、react、react-router、redux
```javascript const defaultHeader = { 'Accept': 'application/json', 'Content-Type': 'application/json' }; const delayPromise = (delay) => { // 默认3秒后没返回数据就是超时 return new Promise((resolve, reject) => { setTimeout(() => { reject({ status: 408,...
## 一、实用用法 - 1、打开多个窗格, 可用于对比查看代码. `View -> Panes -> Split Xxx` ## 二、快捷键 - 1、快速查找文件:`cmd + p`. a: 输入文件名搜索. b: 输入目录 + 文件名搜索. - 2、切换多个页签窗口. 使用`cmd + [1,2,3...]`切换到第几个页签. 如: `cmd...
**1、bind inside** ``` javascript this.props.products.forEach(function(product) { if (product.name.indexOf(this.props.filterText) === -1 || (!product.stocked && this.props.inStockOnly)) { return; } if (product.category !== lastCategory) { rows.push(); } rows.push(); lastCategory = product.category; }.bind(this)); ```...
## 实例 ``` javascript import React, { Component, PropTypes } from 'react'; export default class MyPropsDemo extends Component { render() { const { collapsed = '', num = '', itemClassName...