Skip to content

Instantly share code, notes, and snippets.

@xgqfrms-GitHub
Last active December 22, 2021 18:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save xgqfrms-GitHub/33b08ef2fe4705020af8a8d827775380 to your computer and use it in GitHub Desktop.
Save xgqfrms-GitHub/33b08ef2fe4705020af8a8d827775380 to your computer and use it in GitHub Desktop.
redux-simple-tutorial
@xgqfrms-GitHub
Copy link
Author

@xgqfrms-GitHub
Copy link
Author

xgqfrms-GitHub commented Jul 17, 2017

https://github.com/acdlite/flux-standard-action

https://github.com/acdlite/flux-standard-action#libraries

An action MUST

be a plain JavaScript object.
have a type property.

An action MAY

have an error property.
have a payload property.
have a meta property.

@xgqfrms-GitHub
Copy link
Author

xgqfrms-GitHub commented Jul 17, 2017

open issues ???

https://github.com/xyzdata/redux-simple-tutorial/blob/master/README.md

@xyzdata

reducers return a new depth copy of current state!

Not overwrite!

Object.assing({}, state, {key: value});

@xyzdata
Copy link

xyzdata commented Jul 18, 2017

react+state+immutiable

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

ES6 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

ES7 object spread properties

function updateColorMap(colormap) {
    return {...colormap, right: 'blue'};
}

@xyzdata
Copy link

xyzdata commented Jul 18, 2017

@xyzdata
Copy link

xyzdata commented Jul 18, 2017

https://yuerblog.cc/2017/06/18/care-about-health/

晚上十二点后睡觉等于慢性自杀,
不吃早餐等于慢性自杀,
经常喝酒等于慢性自杀,
手机24小时开机等于慢性自杀,
抽二手烟等于慢性自杀,
长期呆室内等于慢性自杀,
缺乏锻炼等于慢性自杀。

是不是感觉说的就是你,一天啥都没干,光忙着自杀了?并且这不是你一个人“自杀”,而死一个“全民自杀”的时代!

https://www.zhihu.com/question/27318241/answer/90232285

@xyzdata
Copy link

xyzdata commented Jul 18, 2017

@xgqfrms-GitHub
Copy link
Author

xgqfrms-GitHub commented Jul 18, 2017

@xgqfrms-GitHub
Copy link
Author

vue Architecture

Architecture

https://github.com/vuejs/vue-hackernews-2.0

image

https://ssr.vuejs.org/zh/

Vue.js 服务器端渲染指南

@xgqfrms-GitHub
Copy link
Author

xgqfrms-GitHub commented Jul 19, 2017

@xgqfrms-GitHub
Copy link
Author

xgqfrms-GitHub commented Jul 19, 2017

@xgqfrms-GitHub
Copy link
Author

xgqfrms-GitHub commented Jul 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment