We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
In a project Iβm working on, I have a menu in my app layout that displays a number of unread messages. Because this is in the app layout, it does not belong to any one LiveView instance, but to all of them. When a new message comes in, or a message is marked as read, there is a broadcast on a PubSub channel that communicates the unread change. While you can subscribe to a channel within a LiveView, you canβt subscribe to a channel across all LiveViews in order to update what is essentially global state.
continue reading on andrewtimberlake.com
β οΈ This post links to an external website. β οΈ
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.