Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
cag2050 committed Feb 7, 2017
1 parent 3ea0ca7 commit 11f460b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Counter.propTypes = {
// Action:要做的动作
const increaseAction = {type: 'increase'};

//Reducer作用: 根据 Action 来更新 State。
// 首先定义一个改变数据的函数,成为reducer
function counter(state = {count: 0}, action) {
const count = state.count;
Expand Down

0 comments on commit 11f460b

Please sign in to comment.