Beyond Liveview: Real Time Features With Liveview
summary
Demonstrates that a LiveView process plus Phoenix libraries builds a full chat without custom JS by using Phoenix PubSub (PG2) for broadcasts, Presence.track/list to maintain live user lists, and LiveView hooks updated callback to run a tiny scroll adjustment. Mount subscribes to chat:ID, handle_event broadcasts new messages, handle_info consumes broadcasts to assign and re-render, presence diffs update user lists, and a few lines of client hook code set scrollTop. Works in practice but requires PubSub port/config for distributed nodes and under 100 lines of LiveView code.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:08About the speaker
- 1:49Roadmap and live view basics
- 4:57Live view under the hood
- 8:28Extending live view with pub/sub
- 9:32Message broadcasting with pub/sub
- 15:52User tracking with presence
- 25:58Live view and JavaScript interop
- 35:14Recap and summary
- 36:32Q&A
related talks
40mThe Power & Performance of Phoenix LiveView
35mKeynote: Fireside Chat on LiveView, (...)
55mLiveViewJS is the anti-SPA library for reactive app development in NodeJS and Deno
01h 13mKeynote: Phoenix LiveView - Interactive Apps without Javascript
45mWhen Is Liveview a Good Fit
28mLobbying with Elixir: Real-Time LiveView and OTP
30mTales of Using Phoenix LiveView at an Early Stage Startup
24mLiveView and Web Components
