Update README.md

`every second` => `setInterval` not timeout.
This commit is contained in:
Per
2016-06-20 22:31:54 +02:00
committed by GitHub
parent feb798ec1f
commit 25a3e6ad8f
+1 -1
View File
@@ -290,7 +290,7 @@ An example subscription that logs `"dog?"` every second:
const app = choo()
app.model({
subscriptions: [
(send) => setTimeout(() => send('app:print', { payload: 'dog?' }), 1000)
(send) => setInterval(() => send('app:print', { payload: 'dog?' }), 1000)
],
effects: {
'app:print': (state, action) => console.log(action.payload)