You're viewing the Inertia.js v2.0 pre-release documentation. Upgrade guide →
Inertia.js v2.0 is a huge step forward for Inertia! The core library has been completely rewritten to architecturally support asynchronous requests, enabling a whole set of new features, including:
Additionally, for security sensitive projects, Inertia now offers a history encryption API, allowing you to clear page data from history state when logging out of an application.
To upgrade to the Inertia.js v2.0 beta, first use npm to install the client-side adapter of your choice:
npm install @inertiajs/vue3@next
Next, upgrade the inertiajs/inertia-laravel
package to use the 2.x
dev branch:
composer require inertiajs/inertia-laravel:2.x-dev
While a significant release, Inertia.js v2.0 doesn't introduce many breaking changes. Here's a list of all the breaking changes:
The Laravel adapter now requires Laravel 10 and PHP 8.1 at a minimum.
The Vue 2 adapter has been removed. Vue 2 reached End of Life on December 3, 2023, so this felt like it was time.
remember
helper has been rename to useRemember
to be consistent with other helpers.setup
callback in app.js
. You need to pass props
when initializing the App
component. See setup in app.jssetup
callback is now required in ssr.js
. See setup in ssr.jsPreviously partial reloads in Inertia were synchronous, just like all Inertia requests. In v2.0, partial reloads are now asynchronous. Generally this is desireable, but if you were relying on these requests being synchronous, you may need to adjust your code.