Develops reactive Livewire 3 components. Activates when creating, updating, or modifying Livewire components; working with wire:model, wire:click, wire:loading, or any wire: directives; adding real-time updates, loading states, or reactivity; debugging component behavior; writing Livewire tests; or when the user mentions Livewire, component, counter, or reactive UI.
Activate this skill when:
Use search-docs for detailed Livewire 3 patterns and documentation.
Use the php artisan make:livewire [Posts\CreatePost] Artisan command to create new components.
These things changed in Livewire 3, but may not have been updated in this application. Verify this application's setup to ensure you follow existing conventions.
wire:model.live for real-time updates, wire:model is now deferred by default.App\Livewire namespace (not App\Http\Livewire).$this->dispatch() to dispatch events (not emit or dispatchBrowserEvent).components.layouts.app view as the typical layout path (not layouts.app).wire:show, wire:transition, wire:cloak, wire:offline, wire:target are available for use.wire:loading and wire:dirty for delightful loading states.@foreach ($items as $item) <div wire:key="item-{{ $item->id }}"> {{ $item->name }} </div> @endforeach
</code-snippet>Prefer lifecycle hooks like mount(), updatedFoo() for initialization and reactive side effects:
public function mount(User $user) { $this->user = $user; } public function updatedSearch() { $this->resetPage(); }
</code-snippet>You can listen for livewire:init to hook into Livewire initialization:
document.addEventListener('livewire:init', function () { Livewire.hook('request', ({ fail }) => { if (fail && fail.status === 419) { alert('Your session expired'); } });
Livewire.hook('message.failed', (message, component) => {
console.error(message);
});
});
</code-snippet>Livewire::test(Counter::class) ->assertSet('count', 0) ->call('increment') ->assertSet('count', 1) ->assertSee(1) ->assertStatus(200);
</code-snippet> <code-snippet name="Testing Livewire Component Exists on Page" lang="php">$this->get('/posts/create') ->assertSeeLivewire(CreatePost::class);
</code-snippet>wire:key in loops causes unexpected behavior when items changewire:model expecting real-time updates (use wire:model.live instead in v3)npx skills add aboustayyef/livewire-development下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer