Created
September 29, 2020 02:15
-
-
Save alyssoncm/692df3908103e88b5f578a8a98e25047 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subscription.on('open', async () => { | |
console.log('subscription opened'); | |
todos = {}; | |
todos = (await query.find()).reduce((todos, todo) => ({ | |
...todos, | |
[todo.id]: todo | |
}), todos); | |
printTodos(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment