elixir-liveview

Implement LiveView patterns for lifecycle, streams, events, PubSub, and forms.

Updated Feb 16, 2026
One-click install
npx skills add https://github.com/hwatkins/my-skills --skill elixir-liveview
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: elixir-liveview
Source: https://github.com/hwatkins/my-skills/tree/main/skills/elixir-liveview
Command: npx skills add https://github.com/hwatkins/my-skills --skill elixir-liveview

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

LiveView development often faces challenges around structuring the lifecycle, keeping renders efficient, and implementing scalable real-time updates. This guide provides a concise set of patterns and best practices to build responsive, interactive LiveView features with robust state management, streaming updates, and safe event handling.

Core Features & Use Cases

  • Lifecycle optimization: minimal mount, use handle_params for URL-driven state, and avoid blocking operations.
  • Streams & real-time updates: use streams for lists and incremental updates, with phx-update="stream" and proper DOM IDs.
  • Events, PubSub, and forms: validate input server-side, manage PubSub subscriptions, and build robust forms with to_form and validations.
  • Performance & components: use temporary assigns, debouncing, and offload long-running tasks to async operations.

Quick Start

Apply these LiveView patterns to your existing Phoenix app to start building and debugging real-time interfaces immediately.

Frequently Asked Questions about elixir-liveview

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage lists efficiently in Phoenix LiveView?▼

To manage lists efficiently in Phoenix LiveView, use streams for incremental updates. Apply phx-update="stream" with proper DOM IDs to handle large collections without storing the entire list in memory, ensuring responsive real-time rendering.

What's the best way to handle lifecycle events in LiveView?▼

The best way to handle LiveView lifecycle events is keeping the mount minimal and using handle_params for URL-driven state. Avoid blocking operations during initialization to maintain UI responsiveness across dynamic interfaces.

How do I validate forms in real-time using Elixir LiveView?▼

To validate forms in real-time using Elixir LiveView, validate input server-side and build robust forms with to_form. This approach ensures safe event handling and proper state management during dynamic form submissions.

Why is my LiveView performance degrading with frequent updates?▼

LiveView performance may degrade with frequent updates if you are not using temporary assigns, debouncing events, or offloading long-running tasks to async operations. These patterns optimize rendering and prevent UI blocking.

How does PubSub work with LiveView for real-time updates?▼

PubSub works with LiveView by allowing you to manage subscriptions that broadcast real-time updates across clients. Safe event handling ensures that state remains synchronized and rendering stays efficient during dynamic interface interactions.