What is Inertia.js?
You want to build the frontend in React or Vue, but you’d rather not design, implement, and maintain a separate API. Inertia.js solves exactly that dilemma. Inertia is the “glue” that lets you keep your server-side routing and controllers as they are while writing your frontend in React, Vue, or Svelte. It isn’t a framework—it acts as an adapter layer connecting an existing Laravel app to a JavaScript framework.The current latest version is Inertia v3 (released March 26, 2026). Laravel 13’s starter kits (React, Vue, Svelte) already support Inertia.
How it differs from traditional SPAs and MPAs
| Architecture | Characteristics | Challenges |
|---|---|---|
| MPA (traditional Blade app) | Simple, integrates easily with Laravel | Full reloads on every page change |
| SPA (API + separate frontend) | High interactivity | Duplicated management of API design, auth, and types |
| Inertia (modern monolith) | SPA UX + server-side simplicity | Has its own learning curve |
Relationship with Laravel starter kits
If you choose React, Vue, or Svelte when runninglaravel new, Inertia is set up automatically.
inertiajs/inertia-laravel(server-side adapter)@inertiajs/react/@inertiajs/vue3/@inertiajs/svelte(client adapters)- The
HandleInertiaRequestsmiddleware - Auth screens like login, registration, and password reset (already implemented as Inertia components)
The basics of Inertia::render()
Use Inertia::render() to return an Inertia response from a Laravel controller. The first argument is the JavaScript component name, and the second is the data to pass as props.
'Posts/Index' maps to a file path. For React it’s resources/js/Pages/Posts/Index.jsx; for Vue it’s resources/js/Pages/Posts/Index.vue.
Structure of a page component
Inertia page components are ordinary Vue or React components. Data passed from the controller arrives as props.React
Vue
<Link> component routes page transitions via XHR, avoiding a full page reload. It’s written just like a normal <a> tag, but under the hood Inertia only swaps the page component.
Shared data — the HandleInertiaRequests middleware
Define data needed on every page (the logged-in user, flash messages, etc.) in the share() method of the HandleInertiaRequests middleware.
React
Because shared data is included on every request, keep it to the minimum you need. Wrapping values in
fn() for lazy evaluation ensures they’re only evaluated when actually required.Form submission and validation error handling
Form handling in Inertia integrates naturally with Laravel’s validation. TheuseForm() helper makes form state management, submission, and error display straightforward.
Controller side
errors prop.
Frontend side
React
Vue
useForm() displays them while retaining the input values. Users don’t have to re-enter data, improving the experience.
Good fits and poor fits
When Inertia is a good fit
- A team that knows Laravel well wants to build an SPA-like UI
- You want to centrally manage auth, authorization, and validation on the Laravel side
- Admin panels, internal tools, and other apps where SEO isn’t a top priority
- Projects that want to avoid the cost of designing and maintaining a separate API
When it isn’t a good fit
- Multiple external clients (like a mobile app) need to share the same API
- Content sites where SEO is very important (SSR can help, but adds complexity)
- Micro-frontend setups where the frontend is developed by a completely independent team
Highlights of Inertia v3
Inertia v3 was released on March 26, 2026. Here are the main changes from v2.Axios removed — replaced with a lightweight built-in XHR client
v3 removes Axios in favor of a lighter, built-in XHR client. Most applications require no code changes. Axios interceptors can be migrated directly to the built-in interceptors. If you’d rather keep using Axios, it’s still available via the Axios adapter.Simpler SSR with the @inertiajs/vite plugin
Introducing the new Vite plugin dramatically simplifies auto-resolution of page components and SSR configuration. SSR now runs during development simply by running npm run dev, with no separate Node server required.
useHttp hook — HTTP requests without page transitions
The useHttp hook lets you send HTTP requests to the server without causing an Inertia visit. Useful when you want to communicate while staying on the current page—for saving modals or handling background work, for instance.
Optimistic UI updates
Optimistic updates are now supported at both theuseForm and router levels. The UI is updated immediately without waiting for the server response, and rolls back automatically if the request fails.
Layout props
TheuseLayoutProps hook lets you pass data from page components up to a persistent layout. It cleanly handles “controlling layout state for a specific page,” which previously required shared data or page props.
Requirements changes
v3 raises several minimum versions:| Item | v2 | v3 |
|---|---|---|
| PHP | 8.1+ | 8.2+ |
| Laravel | 10+ | 11+ |
| React | 18+ | 19+ |
| Svelte | 4+ | 5+ |
Removal of Inertia::lazy()
Inertia::lazy(), which was deprecated in v2, has been fully removed in v3. Use Inertia::optional() instead.
Event name changes
| v2 | v3 |
|---|---|
invalid | httpException |
exception | networkError |
Removal of the future option
The future configuration block, offered as experimental in v2, has been removed. All of those options are now enabled by default. Remove the future block from your createInertiaApp configuration.
For details on upgrading from v2, see the official upgrade guide. v2 receives bug fixes through September 26, 2026 and security fixes through March 26, 2027.
Summary
Inertia.js addresses the very real need to “keep Laravel as is, but write the frontend in React/Vue.” Its greatest strength is the simplicity of passing data directly from controllers to components without designing an API. The fact that Laravel 13’s starter kits support Inertia shows how established Inertia’s position in the Laravel ecosystem has become. Where Livewire builds dynamic UIs using only PHP, Inertia leverages the power of a JavaScript framework without sacrificing server-side simplicity. Which one to choose depends on your team’s skills and project requirements, but for the case “I want to keep my Laravel controllers as-is and build the UI in React,” Inertia is the most natural choice.Inertia.js official docs
See the official documentation for all Inertia v3 features.