Skip to content
spatie avatar

Livewire Development

Reactive Livewire 4 component guidance covering formats, directives, islands, async actions, and testing.

CCM score
60 of 100
skills.sh installs
636
GitHub stars
647
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers component creation in single-file, multi-file, class-based, and view-based formats, with a conversion command between them
  • Includes a v3-to-v4 migration list (renamed config keys, wire:model child-event behavior, and changed JavaScript hooks) and new directives like wire:sort and wire:intersect
  • Enforces wire:key on loop elements and validation and authorization inside actions, with a list of common pitfalls to check
  • Designed for Laravel teams building reactive UI with Livewire 4, including islands, async actions, and Livewire tests

Install

$ npx -y skills add spatie/freek.dev --skill livewire-development -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Livewire Development

When to Apply

Activate this skill when:

  • Creating or modifying Livewire components
  • Using wire: directives (model, click, loading, sort, intersect)
  • Implementing islands or async actions
  • Writing Livewire component tests

Documentation

Use search-docs for detailed Livewire 4 patterns and documentation.

Basic Usage

Creating Components

Single-file component (default in v4)

{{ $assist->artisanCommand('make:livewire create-post') }}

Multi-file component

{{ $assist->artisanCommand('make:livewire create-post --mfc') }}

Class-based component (v3 style)

{{ $assist->artisanCommand('make:livewire create-post --class') }}

With namespace

{{ $assist->artisanCommand('make:livewire Posts/CreatePost') }}

Converting Between Formats

Use php artisan livewire:convert create-post to convert between single-file, multi-file, and class-based formats.

Component Format Reference

Details

Repository
github.com/spatie/freek.dev
Categories
PHP & Laravel, Frontend & UI Code
First seen
Jun 3, 2026

More from spatie/freek.dev

All 2

Similar to Livewire Development

More PHP & Laravel