Update README.md

Can't set namespace under `effects`.
This commit is contained in:
Per
2016-06-21 22:35:11 +02:00
committed by GitHub
parent d1e6185fa4
commit 14e905fb4e
+2 -1
View File
@@ -289,11 +289,12 @@ An example subscription that logs `"dog?"` every second:
```js ```js
const app = choo() const app = choo()
app.model({ app.model({
namespace: 'app',
subscriptions: [ subscriptions: [
(send) => setInterval(() => send('app:print', { payload: 'dog?' }), 1000) (send) => setInterval(() => send('app:print', { payload: 'dog?' }), 1000)
], ],
effects: { effects: {
'app:print': (action, state) => console.log(action.payload) print: (action, state) => console.log(action.payload)
} }
}) })
``` ```