skip to content

Inertia

Inertia glues a server framework such as Laravel or Rails to React, Vue or Svelte pages without a separate API. Interviewers probe where routing, props and state belong on each side.

on this pageshow

explore

questions

page 2 of 2

How does Inertia 3 split page components into separate chunks, and when would you set pages.lazy to false instead?

level: seniorimportance: nice to knowfreq 22%

basics

~20 s

By default Inertia 3 lazy-loads page components, so Vite builds one chunk per page that downloads on its first visit; setting pages.lazy to false, or import.meta.glob with eager: true, bundles every page up front, trading a bigger first download for no per-page fetches.

open as a page

How does Inertia 3's built-in Precognition give a customer form live validation with validate() and invalid(), and what must the Laravel route provide?

level: seniorimportance: nice to knowfreq 22%

basics

~20 s

Precognition sends the form to its real route with a Precognition header; Laravel's precognitive middleware runs validation from the route's form request but not the controller, answering 204 or 422, and useForm's validate() and invalid() show the result per field.

open as a page

With Inertia on Laravel, when do Inertia::once and shareOnce save work, and how can a remembered once prop go stale?

level: seniorimportance: nice to knowfreq 15%

basics

~20 s

Inertia::once(fn () => ...) resolves a prop once; the client remembers it and lists it in X-Inertia-Except-Once-Props so later visits skip it. It goes stale when the data changes and nothing forces fresh(), an expiry or a partial reload.

open as a page

showing 31–33 of 33