Chris McCord ElixirConfEU Keynote: Phoenix LiveView - Interactive, Real TIme Apps - No need to write Javascript

One resource for liveview…


Great talk, the demos ran so nice on a conference room wifi, but what I was really surprised was to see how smooth it is to test live views! Rich interaction testing with no browser needed is such a privilege. :fire::clap:t3:


I think LiveView is probably one of most visual ways to teach Elixir beginners about GenServer.


I agree maz, and it’s also a great way to interactively understand pretty well any code you’re working on - it’s almost a bio-feedback developer experience…

BTW, if anyone is wondering how to enable viewing of payload to the browser (I know someone asked previously, and it featured pretty heavily in the video), it isn’t yet documented but there’s an option in the LiveSocket constructor in app.js. By default it looks like this:
let liveSocket = new LiveSocket("/live")
but if you update that line to:
let liveSocket = new LiveSocket("/live", {viewLogger: debug})
the browser console will get all the debug messages…

EDIT: It’s probably obvious to those of you who live and breathe JS, but I avoid it like the plague… you need to ensure you import the debug function in order to attach it:
import {LiveSocket, debug} from "phoenix_live_view"


This has been well-worth the wait. Not only does it seem like the “right” way to do things for the middle-ground between static pages & SPAs, it will allow devs to thrive in that middle-ground without getting sucked into the quagmire that is today’s state of JavaScript development. I’ve mostly avoided JS in favor of backend work in recent years, and I’m excited to see this flip some tables.


Chris McCord Keynote: Phoenix LiveView - Interactive, Real TIme Apps - No need to write Javascript

Chris McCord is a programmer with a passion for science and building things. He spends his time crafting the Phoenix Framework, working with the fine folks at DockYard, writing books like Metaprogramming Elixir, and teaching others the tools of the trade.
Github: chrismccord
Twitter: @chris_mccord

Learn more about ElixirConf:

ElixirConf EU

1 Like