The Pragmatic Studio

LiveView Course Update #4: Live Components and Real-Time Updates

March 15, 2023

Today we added 2 new modules (3 videos) to our Phoenix LiveView course on designing Live Components and using Phoenix PubSub to broadcast real-time updates to multiple LiveViews. 📡

Live Components

In addition to function (stateless) components, LiveView also has live (stateful) components. They have their own state, handle their own events, and render independent of their parent LiveView. We build a live component step-by-step so you understand how they work, when and why to use them, and how they communicate with their parent LiveView.

Real-Time Updates

You don’t have to jump through a bunch of hoops to update LiveViews in real-time across multiple browser sessions. Phoenix PubSub makes it super easy to broadcast messages from the server to multiple LiveViews. To cap off the volunteers project, we use PubSub to keep everything in sync!

How do I get the new course modules?

If you purchased the previous Pro version of the course, go to your account dashboard and click the big green “REDEEM” button to get the new Pro course for free. Or, if you’ve already done that, just head over to the course and you’ll find the new modules ready for you!

Don’t yet own the Pro course? What are you waiting for? You can do amazing things with LiveView! And there’s still time to get the Pro course at the early access price:

Next up is authentication and live sessions! 🕵️‍♀️