- map
- filter
- reduce 累加
- find
- every
- some
undefined, null, string, number, boolean, and symbol
.
symbol 是 ES6 新定义, 主要概念:
- symbol 表示独一无二的值。所以可以用来做对象的属性名。
- symbol 通过
Symbol()
函数生成。 - symbol 值不能与其他类型的值进行运算。
// Symbol() 函数的参数只是表示 Symbol 值的描述,因此即使参数相同,返回值也不相等。
let s1 = Symbol()
- import Loadable from 'react-loadable';
+ // $FlowFixMe: it is open issue on flow repo https://github.com/facebook/flow/issues/7093
+ import React, { lazy, Suspense } from 'react';
- const AsyncItemsSection = Loadable({
- loading: () => ,
函数式编程可以把复杂逻辑写成pipeline
形式,拆分逻辑,易理解,不易出错。
下面这篇文章中有一个例子 http://www.ruanyifeng.com/blog/2017/03/pointfree.html
使用 Ramda 项目。
关于 Remda 的入门教程
"window.title": "${activeEditorLong}${separator}${rootName}",
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
/* eslint-disable import/no-extraneous-dependencies */ | |
import { storiesOf } from '@storybook/react'; | |
// action | |
import { action } from '@storybook/addon-actions'; | |
import EntityTypesInput from './index'; | |
storiesOf('EntityTypes Input', module).add('default', () => ( | |
<EntityTypesInput name="test" items={[1, 2, 3, 4]} value={[1, 3]} onChange={action('onChange')} /> | |
)); |
-
恢复上一个关闭的窗口 cmd+shift+t
-
跳转到地址栏 cmd+l
-
切换 tab ctrl + tab