What’s New
Inertia.js v1.0 focuses on simplifying the overall architecture of the project with the goal of making Inertia easier to maintain and easier to use. It includes a number of breaking changes, mostly related to package names and updated named exports. This guide explains how to upgrade your project to v1.0. For a complete list of all the changes, see the release notes.New Dependencies
To use previous Inertia releases, you had to install a number of libraries, including the core library (@inertiajs/inertia), the adapter of your choice (@inertiajs/inertia-vue|vue3|react|svelte), the progress library (@inertiajs/progress), and if you were using server-side rendering, the server library (@inertiajs/server).
Moving forward you are now only required to install a single library — the adapter of your choice (Vue, React, or Svelte), and all other core libraries are automatically installed for you.
To get started, remove all of the old Inertia libraries.
inertia- in them.
Renamed Imports
Next, update all the Inertia related imports in your project to use the new adapter library name. All imports are now available from the adapter library, meaning you no longer import anything from the Inertia core library, progress library, or server library. Additionally, some exports have been renamed and previously deprecated exports have been removed. For example, theInertia export has been renamed to router.
Here is a complete list of all the import changes:
App export. Instead, you should use the createInertiaApp() helper. See the client-side setup documentation for more information.
Progress
Previously, the progress indicator was available as a separate plugin (@inertiajs/progress). It is now installed and enabled by default.
If you haven’t yet, remove the old progress library.
InertiaProgress import and InertiaProgress.init() call, as they are no longer required.
progressproperty of the createInertiaApp() helper.
progress property to false.
Setup Arguments
We’ve removed the previously deprecated lowercaseapp argument from the setup() method in createInertiaApp(). Use App instead.
Simplified Usepage
In the Vue 3 adapter, we simplified theusePage() hook to no longer require adding .value after the component, props, url and version properties.
If you’re using the usePage() hook, remove all instances of .value.