Laravel

Livewire & Inertia

Livewire components, wire:model, validation, Inertia.js setup, partial reloads, shared data, router, comparisons

20 preguntas de entrevista·
Mid-Level
1

What is Livewire in the context of Laravel?

Respuesta

Livewire is a full-stack framework for Laravel that enables building dynamic and reactive user interfaces entirely in PHP, without needing to write much JavaScript. It automatically handles communication between server and client via AJAX requests, allowing creation of interactive components similar to modern JavaScript frameworks while staying within the PHP/Laravel ecosystem.

2

Which modifier to use with wire:model to trigger an update only when the user leaves an input field?

Respuesta

The .blur modifier triggers a Livewire update only when the user leaves the field (blur event), for example by clicking elsewhere or using the Tab key. This reduces network requests compared to .live which sends a request on every keystroke. It's useful for forms where real-time validation isn't necessary for each character typed.

3

What is the purpose of the #[Modelable] attribute in a Livewire child component?

Respuesta

The #[Modelable] attribute signals to Livewire that a child component property should be bidirectionally bound with the parent's wire:model. This allows extracting form fields into reusable components while maintaining state synchronization with the parent. Currently, only the first #[Modelable] attribute per component is supported.

4

Which Livewire directive allows displaying a visual indicator when a field has unsaved changes?

5

Which Livewire modifier allows delaying network requests by 250ms after the last user keystroke?

+17 preguntas de entrevista

Domina Laravel para tu próxima entrevista

Accede a todas las preguntas, flashcards, tests técnicos, ejercicios de code review y simuladores de entrevista.

Empieza gratis