docs: fix effects param order

Closes https://github.com/yoshuawuyts/choo/issues/59
This commit is contained in:
Yoshua Wuyts
2016-06-21 02:02:23 +01:00
parent b6b41bc031
commit d1e6185fa4
+2 -2
View File
@@ -248,7 +248,7 @@ app.model({
namespace: 'todos', namespace: 'todos',
state: { todos: [] }, state: { todos: [] },
reducers: { reducers: {
add: (state, action) => ({ todos: state.todos.concat(action.payload) }) add: (action, state) => ({ todos: state.todos.concat(action.payload) })
} }
}) })
``` ```
@@ -293,7 +293,7 @@ app.model({
(send) => setInterval(() => send('app:print', { payload: 'dog?' }), 1000) (send) => setInterval(() => send('app:print', { payload: 'dog?' }), 1000)
], ],
effects: { effects: {
'app:print': (state, action) => console.log(action.payload) 'app:print': (action, state) => console.log(action.payload)
} }
}) })
``` ```