Livewire 4 dah release — dan ini bukan minor update. Ini paradigm shift.
Single-file components, Islands untuk performance isolation, Route::livewire(), component slots & attributes, inline JS/CSS — banyak benda baru yang mengubah cara kita build reactive UI dalam Laravel.
Tapi soalan besar: macam mana nak migrate dari v3 tanpa pecahkan production app?
Dalam workshop 3 jam ni, kita akan cover semua new features dalam Livewire 4, fahami breaking changes yang ada, dan buat hands-on migration dari v3 ke v4. Kelas ni untuk developers yang dah guna Livewire 3 dan nak upgrade dengan yakin.
Agenda
9:00 – 9:15 | Setting the Stage
- Kenapa Livewire 4 bukan sekadar version bump
- The "fourth way" — how Caleb unified the component story (goodbye Volt confusion)
- Quick overview: apa yang sama, apa yang berubah
9:15 – 10:00 | What's New in Livewire 4
- Single-File Components — PHP + Blade dalam satu file (⚡.wire.php), the new default
- Multi-File Components — directory-based structure untuk larger components
- Islands — isolated regions yang update independently, lazy loading, append for infinite scroll
- Route::livewire() — new routing approach, namespaces (pages::, layouts::)
- Component Slots & Attributes — Blade-like slot support, attribute forwarding
- Inline JS & CSS — co-located scripts and styles dengan automatic bundling
- New Directory Structure — resources/views/components/, pages/, layouts/
- Live demo setiap feature
10:00 – 10:15 | Break
10:15 – 11:00 | Breaking Changes & Migration Guide
- wire:model — sekarang .self by default, guna .deep untuk old behavior
- wire:model.blur / .change — sekarang control client-side state sync, tambah .live untuk old behavior
- wire:transition — now CSS-only, Alpine modifiers removed
- Component tags — mesti properly closed (slot support)
- Route::livewire() — required untuk single-file & multi-file full-page components
- Config changes & method signature updates
- Hands-on: migrate a real Livewire 3 component to v4 step by step
11:00 – 11:45 | Hands-On: Build & Migrate
- Participants follow along: convert a v3 component to v4 single-file format
- Add Islands to an existing component for performance
- Implement slots & attributes on a reusable component
- Testing with Livewire::test() — what changed
11:45 – 12:00 | Wrap Up & Q&A
- Migration checklist recap
- Laravel Shift option untuk automated migration
- Resources: official docs, Laracasts series
- Q&A