Ok let’s imagine that we have 100 friends that use our list and they are all adding books to the list now. We can refresh the page to see results or pushing F5 each minute but that’s boring and contrproductive and not smart ! Let’s make our app update list itself if someone added a book.
How to do that
As usual i will show the simpliest way possible. We will use pusher.com service and clj-pusher lib to make our site realtime.
We need to add this code to our app.cljs:
This will hook us to pusher service. Ok we subscribed to the channel and using 1 event (my_event).