Fork me on GitHub
#om
<
2016-08-21
>
myguidingstar16:08:57

hi all, what's is the om.next way to push updates from server to client?

myguidingstar16:08:35

eg in a chat app?

anmonteiro16:08:31

@myguidingstar call om.next/merge! with the novelty

myguidingstar16:08:54

well, I want to know the recommended medium to transfer the novelty, too. For instance, the old way is to put arbitrary data to websocket or polling then add an event listener

anmonteiro16:08:56

that’s just out of scope of Om Next

anmonteiro16:08:11

what matters is how you side-load your data into the app

anmonteiro16:08:15

which is what I answered

anmonteiro16:08:43

whichever method you use (websockets, polling, SSE…) is completely up to you

myguidingstar16:08:12

you're right, om.next/merge! is the sufficient answer. Thanks a lot

anmonteiro23:08:16

haven’t had the time to write docs, but you can get the big picture from the devcards examples: https://github.com/compassus/omify/blob/master/src/devcards/omify/devcards/core.cljs

anmonteiro23:08:31

(I also included one using Recharts)