Inertia.js lets you build a full SPA on top of Laravel without creating a separate REST API. Controllers return React, Vue or Svelte page components with data instead of Blade views, and Inertia handles navigation without full page reloads. The result — one repository, one deployment, session-based authentication and 30–50% lower maintenance cost than a classic API-plus-SPA setup. This is the architecture behind our own products, OneCRMApp and FamilyTimelineApp.
How Inertia.js works
In a classic SPA the frontend talks to the backend through an API — endpoints, token authentication, error handling and a versioned contract to maintain. Inertia removes that layer. A Laravel controller returns a page component name and its data.
return Inertia::render('Orders/Index', [
'orders' => OrderResource::collection($orders),
'filters' => $request->only(['status', 'search']),
]);
On the React side the component receives the data as props.
export default function OrdersIndex({ orders, filters }) {
return (
<div>
<h1>Orders</h1>
<OrdersTable rows={orders.data} initialFilters={filters} />
</div>
);
}
Inertia links are intercepted in the browser and sent as XHR requests — the server responds with the component and props, and the page swaps without a reload. Routing stays in Laravel, browser history works normally, and forms get built-in validation error handling.
Inertia.js vs API plus SPA
| Criterion | Inertia.js | API + SPA |
|---|---|---|
| Repositories | One | Two (backend and frontend) |
| Authentication | Laravel session (simple) | Tokens (Sanctum, OAuth) |
| API contract | Does not exist | To design and version |
| Deployment | One | Two, version-coordinated |
| Mobile app | Not supported | Natural fit |
| Maintenance cost | 30–50% lower | Higher — two worlds |
| When to choose | One client (web), SaaS products | Mobile, many clients, public API |
The boundary is simple. As long as your web app is the only client, Inertia delivers every SPA benefit without the API layer. When a mobile app or a public partner API appears, you extract the API — and now it has a real consumer instead of a hypothetical one.
Wskazówka: Do not build an API "for the future". Build it when the second client appears. A premature API is the most common way to double the maintenance cost of an application that only ever needed to serve a browser.
Inertia.js with React in practice
React is the most common choice with Inertia in our projects. What you get out of the box
- Laravel-side routing — routes, middleware and authorization work as in a classic app.
- Forms with validation — the useForm hook submits data and maps Laravel errors onto fields.
- Partial reloads — refresh only selected props instead of the whole page.
- Prefetching — Inertia can preload pages on link hover.
- Deferred props — heavy data loads after the first render, so the page is interactive immediately.
- TypeScript — fully typed props on the React side.
On the Laravel side you keep everything the framework offers — Eloquent, validation, policies, queues, feature tests. When testing, you assert Inertia responses exactly like Blade views, so your existing test suite works unchanged.
SSR and SEO — can an SPA be indexed?
Yes. Inertia supports server-side rendering — React components render to HTML on a Node server, and the browser receives a ready page. For applications with public-facing content (marketing pages, catalogs, portals), SSR is the key to good SEO and fast first paint.
Our standard for projects with public traffic is SSR plus classic meta tags and structured data generated on the Laravel side. This keeps an SPA visible to search engines and Core Web Vitals under control.
When Inertia.js is the best choice
- SaaS products — subscription platforms with dashboards and rich interfaces.
- Client portals and B2B applications — where SPA smoothness matters but there is no separate frontend team.
- Replacing an old interface — modernizing Blade views into an SPA without rewriting the backend into an API.
- Ambitious MVPs — start in one repository, extract an API later if needed.
When is Inertia not the right call?
When you need a mobile app or a public multi-partner API from day one, or when the frontend has its own team and release cycle. Then the API-and-Sanctum model is the better fit.
What an Inertia.js SPA costs
Rough ranges, net + VAT, at our 90–160 PLN/h rate
- A simple product with 5–10 screens — 15,000–30,000 PLN, 3–5 weeks.
- An extended SaaS with roles and an admin panel — 30,000–60,000 PLN, 6–10 weeks.
- Migrating an existing Blade app to Inertia — scoped after an audit, usually 2,000–8,000 PLN per module.
Compare that with the API-plus-SPA model, where the API layer and dual deployment typically add 20–40% to maintenance cost. We describe the full decision framework in our Polish guide to choosing a Laravel frontend.
Our products built with Inertia.js
We do not describe theory — we run this architecture in production. OneCRMApp is a CRM for insurance agents built with Laravel 12, React and Inertia.js — roles, calendar, settlements and reporting. FamilyTimelineApp is a family timeline app on the same stack plus an Android client (Capacitor). Both prove that Inertia works for products with real traffic and a multi-year roadmap.
FAQ
What is Inertia.js in Laravel?
Inertia.js is a library that connects a Laravel backend with React, Vue or Svelte components without a REST API layer. Controllers return page components with data, and Inertia handles SPA navigation in the browser.
Is Inertia.js a framework?
Not exactly — Inertia is the glue between backend and frontend. It does not replace Laravel or React; it defines how they communicate. Routing, authentication and business logic stay in the backend framework.
Inertia.js or Livewire?
Livewire is simpler and sufficient for internal panels — everything in PHP. Inertia delivers a full SPA with React/Vue and fits products with rich interfaces. A common setup is Livewire for the admin panel plus Inertia for the product itself.
Is Inertia.js suitable for large applications?
- Yes — with good practices: component splitting, deferred props for heavy data, SSR for public pages, caching and pagination. SaaS products with thousands of users run on Inertia, including ours.
Is an Inertia.js SPA visible to Google?
Yes, with SSR enabled and proper meta tags and structured data generated server-side. Without SSR the app can still be indexed, but SSR gives faster first render and better Core Web Vitals.
How much does it cost to adopt Inertia.js in an existing project?
Migrating Blade views to Inertia usually costs 2,000–8,000 PLN net + VAT per module, depending on interface complexity. The backend, models and permissions stay unchanged, so the risk is far lower than rewriting onto a separate API.
👉 Planning a SaaS product on Laravel and React? Check our Laravel development services or hire a Laravel developer — estimates are free.
📖 Read more: Laravel performance optimization and Laravel application security.