The combineReducers function we used in previous post:const todoApp = combineReducers({ todos, visibilityFilter});It accepts and object as agruement.....
分类:
其他好文 时间:
2015-12-22 06:30:09
阅读次数:
201
Previous, we do composition with objects:const todoApp = (state = {}, action) => { return { todos: todos( state.todos, action ), v...
分类:
其他好文 时间:
2015-12-22 06:28:30
阅读次数:
186
For example, current we have those todos:{ todos: [ { completed: true, id: 0, text: "Learn Redux"}, { completed: false, id: 1, text: "Go shoppi...
分类:
其他好文 时间:
2015-12-17 01:51:30
阅读次数:
280
https://github.com/jackielii/simplest-redux-example/blob/es5/index.jsreduxhttps://github.com/rackt/react-redux/blob/master/docs/quick-start.md#quick-s...
分类:
其他好文 时间:
2015-12-06 01:45:28
阅读次数:
182
https://code-cartoons.com/a-cartoon-guide-to-flux-6157355ab207https://code-cartoons.com/a-cartoon-intro-to-redux-3afb775501a6flux和reduxhttp://babeljs....
分类:
其他好文 时间:
2015-12-02 14:12:16
阅读次数:
131
In the previous lesson we created a reducer that can handle two actions, adding a new to-do, and toggling an existing to-do. Right now, the code to up...
分类:
其他好文 时间:
2015-12-02 06:37:18
阅读次数:
185
Learn how to implement adding a todo in a todo list application reducer.let todo = (state = [], action) => { switch(action.type){ case 'ADD_ITEM...
分类:
其他好文 时间:
2015-12-02 06:31:46
阅读次数:
144
For Redux, you cannot use mutable methods like push, splice. Need to use immutable methods such as concat, slice and ...spreadHtml: JS Bin push(...
分类:
其他好文 时间:
2015-11-29 06:24:54
阅读次数:
187
Before you use the React Redux bindings, learn how to create a complete simple application with just React and Redux. JS Bin const counter = ...
分类:
其他好文 时间:
2015-11-26 06:57:19
阅读次数:
260
Learn how to build a reasonable approximation of the Redux Store in 20 lines. No magic!const counter = (state = 0, action) => { switch (action.type) ....
分类:
其他好文 时间:
2015-11-26 06:56:22
阅读次数:
198