https://github.com/xyzdata/redux-simple-tutorial
//
https://github.com/kenberkeley/react-scaffold
https://github.com/kenberkeley/react-demo
//
https://github.com/acdlite/flux-standard-action
https://github.com/acdlite/flux-standard-action#libraries
be a plain JavaScript object.
have a type
property.
have an error
property.
have a payload
property.
have a meta
property.
https://github.com/xyzdata/redux-simple-tutorial/blob/master/README.md
reducers return a new depth copy of current state!
Not overwrite!
Object.assing({}, state, {key: value});
https://github.com/facebook/immutable-js/wiki/Immutable-as-React-state
https://facebook.github.io/react/docs/update.html
https://facebook.github.io/react/docs/optimizing-performance.html#the-power-of-not-mutating-data
Object.assign()
function updateColorMap(colormap) {
return Object.assign({}, colormap, {right: 'blue'});
}
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
object spread properties
function updateColorMap(colormap) {
return {...colormap, right: 'blue'};
}
https://facebook.github.io/react/docs/optimizing-performance.html#using-immutable-data-structures
https://yuerblog.cc/2017/06/18/care-about-health/
晚上十二点后睡觉等于慢性自杀,
不吃早餐等于慢性自杀,
经常喝酒等于慢性自杀,
手机24小时开机等于慢性自杀,
抽二手烟等于慢性自杀,
长期呆室内等于慢性自杀,
缺乏锻炼等于慢性自杀。
是不是感觉说的就是你,一天啥都没干,光忙着自杀了?并且这不是你一个人“自杀”,而死一个“全民自杀”的时代!
https://www.zhihu.com/question/27318241/answer/90232285
import $ from "jquery";
???https://github.com/owenliang/react/blob/master/component/MenuPage/MenuPage.es6
spread operator
& ES6 Object shorthand properties
https://gist.github.com/xgqfrms-GitHub/cbcf462a76a287e1bb3392f10f153fd4#gistcomment-2152001
https://github.com/xyzdata/redux-simple-tutorial/blob/master/README.md#-需求-1在控制台上记录用户的每个动作
reduxImmutableStateInvariant
redux-immutable-state-invariant
// () === invoke function
reduxImmutableStateInvariant()
https://github.com/mobxjs/mobx
https://github.com/reflux/refluxjs