Code review at scale is broken. Here’s how Augment Code is fixing it.

Inertia.js v3.0.0 Is Here with Optimistic Updates, useHttp, and More

Last updated on by

Inertia.js v3.0.0 Is Here with Optimistic Updates, useHttp, and More image

Inertia.js v3.0.0 is now released. We covered the beta earlier this year, and the final release ships with those features alongside a number of fixes and refinements accumulated during the beta period. The release touches the core package and all three adapters (React, Vue, and Svelte).

Key highlights:

  • Built-in XHR HTTP client replaces Axios as a required dependency
  • New useHttp hook for making non-navigation HTTP requests
  • First-class optimistic update support across the router, useForm, and useHttp
  • Layout props API replaces event bus and provide/inject workarounds
  • SSR now works in Vite development mode without a separate server process

What's New

Built-In XHR Client — Axios Now Optional

Axios is no longer a required dependency. Inertia now ships its own XHR client, which removes Axios (~15KB gzipped) from your bundle by default. If you rely on Axios interceptors or need to preserve existing behavior, Axios is still available as an optional peer dependency.

The qs package was also removed. Install it directly if your application depends on it.

PR: #2833

useHttp Hook

The new useHttp hook covers the long-standing gap for making HTTP requests that don't trigger a page navigation. It returns reactive state — processing, errors, progress, and isDirty — matching the DX of useForm. It also integrates with Precognition 2.x for real-time validation.

const http = useHttp({
query: '',
})
 
const search = () => {
http.get('/api/search').then((results) => {
console.log('Found:', results.length)
})
}

This hook is intended for routes that return response()->json(), not Inertia::render(). A withAllErrors option is also supported for returning all validation errors at once rather than the first per field.

PR: #2840, #2880

Optimistic Updates

Inertia v3 adds a first-class optimistic update API across the router, useForm, and useHttp. Changes are applied immediately to page state and automatically rolled back on non-2xx responses. Only keys explicitly defined in the callback are snapshotted. Concurrent optimistic updates are also handled — multiple in-flight requests each carry their own rollback snapshot.

// Fluent
router
.optimistic((props) => ({
todos: [...props.todos, { id: Date.now(), name, done: false }],
}))
.post('/todos', { name })
 
// Inline option
router.post('/todos', { name }, {
optimistic: (props) => ({
todos: [...props.todos, { id: Date.now(), name, done: false }],
}),
})

The <Form> component also gains an optimistic prop, and both optimistic and transform callbacks now have generic type inference.

const form = useForm({ name: '' })
 
const addTodo = () => {
form
.optimistic((props) => ({
todos: [...props.todos, { id: Date.now(), name: form.name, done: false }],
}))
.post('/todos')
}

PR: #2866, #2898, #2881

Layout Props

useLayoutProps and setLayoutProps give pages a clean way to pass data into their layout without reaching for an event bus or provide/inject. Layouts declare defaults; pages call setLayoutProps() to override them. The final implementation passes layout props directly as component props.

PR: #2859, #3005

SSR in Vite Development Mode

SSR now works during npm run dev without running a separate Node.js server process. The Vite plugin handles it automatically, and a flash-of-unstyled-content fix is included. For production, the workflow is unchanged: vite build && vite build --ssr, then php artisan inertia:start-ssr.

PR: #2864, #2911

More in v3

The following features also ship in v3.0.0. See the official documentation and upgrade guide for full details:

  • Instant Visits (#2907) — swap to the target page component immediately using shared props before the server responds; page-specific props merge in on arrival
  • createInertiaApp() without arguments (#2883) — can now be called with zero config when using the Vite plugin; a layout option and withApp callback were also added (#2884, #2949)
  • preserveFragment option (#2897, #2899) — preserve URL fragments across redirects, with server-side support in the Laravel adapter
  • preserveErrors option (#2819) — retain validation errors during partial reloads
  • <Deferred> reloading slot prop (#2860) — the component no longer resets on partial reloads; use the new slot prop to handle that state yourself
  • HttpError base class (#2999) — a typed base class for HTTP exceptions in the event system
  • Popover API progress bar (#2917) — the progress bar is rewritten using the browser's native Popover API
  • React Strict Mode (#2909) — pass strictMode: true to createInertiaApp() to enable React.StrictMode
  • Svelte 5 adapter (#2677) — rewritten with rune syntax; Svelte 4 is dropped
  • SharedPageProps in event and createInertiaApp types (#2956) — shared props are now included in the TypeScript types for events and app setup

Upgrade Notes

This is a major release with breaking changes, including updated framework version requirements, the Axios removal, ESM-only output, and a number of renamed APIs. Review the official upgrade guide for the full list before upgrading.

To upgrade:

npm install @inertiajs/vue3@^3.0 # or @inertiajs/react / @inertiajs/svelte
npm install @inertiajs/vite@^3.0
composer require inertiajs/inertia-laravel:^3.0

References

Paul Redmond photo

Staff writer at Laravel News. Full stack web developer and author.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

image
SerpApi

The Web Search API for Your LLM and AI Applications

Visit SerpApi
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
Get expert guidance in a few days with a Laravel code review logo

Get expert guidance in a few days with a Laravel code review

Expert code review! Get clear, practical feedback from two Laravel devs with 10+ years of experience helping teams build better apps.

Get expert guidance in a few days with a Laravel code review
PhpStorm logo

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit

The latest

View all →
Inertia.js v3.0.0 Is Here with Optimistic Updates, useHttp, and More image

Inertia.js v3.0.0 Is Here with Optimistic Updates, useHttp, and More

Read article
Laravel Boost v2.4.0 Adds Security Audits and a Laravel Best Practices Skill image

Laravel Boost v2.4.0 Adds Security Audits and a Laravel Best Practices Skill

Read article
Building Transaction-Safe Multi-Document Operations in Laravel image

Building Transaction-Safe Multi-Document Operations in Laravel

Read article
Ship AI with Laravel: Building Your First Agent with Laravel 13's AI SDK image

Ship AI with Laravel: Building Your First Agent with Laravel 13's AI SDK

Read article
OG Kit: Generate Dynamic Open Graph Images with HTML and CSS image

OG Kit: Generate Dynamic Open Graph Images with HTML and CSS

Read article
Prism Workers AI — A Cloudflare Workers AI Provider for Prism PHP image

Prism Workers AI — A Cloudflare Workers AI Provider for Prism PHP

Read article