docs: fix effects param order
Closes https://github.com/yoshuawuyts/choo/issues/59
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user