Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

rotaercz's avatar

Livewire or Inertia for refactoring older project?

So I have an old Laravel 5.5 Project which uses jQuery. I'd like to upgrade it to Laravel 9.x. I'm planning on installing a new version of Laravel 9.x and using Jetstream for the authentication stuff and will be copying the files over and refactoring everything accordingly. In the long term the jQuery stuff will be upgraded to Svelte.

So in this kind of scenario should I be using Livewire or Inertia for an easier time?

EDIT: I guess a better question would be, is there a version of Jetstream where the scaffolding is just pure HTML? (without Livewire or Inertia)

0 likes
4 replies
vincent15000's avatar

Livewire allows to have interactivity (like jQuery / JavaScript) coding only in PHP, whereas InertiaJS is a sort of glue to bind Laravel with VueJS.

So Livewire could be compared to VueJS and not to InertiaJS.

ekrist1's avatar

Inertia works with Vue, React and Svelte (iertiajs.com/client-side-setup) on the client side, so my choice would be to use Inertia. You may still be able to use Jetstream, but you will need to refactor the frontend from Vue to Svelte.

MichaelCrowcroft's avatar
Level 5

I think there's two few things here

  1. Laravel 5.5 -> 9 w/Jetstream
  2. JQuery -> Svelte

For the first step moving to Jetstream should be straightforward assuming you haven't written any crazy custom auth logic. For Jetstream you can either have Inertia + Vue or Livewire + Blade components.

Realistically you could use either of those for the auth sections and then do whatever you want for the rest of the app, although that might be annoying down the line if you've moving to Svelte.

So, the next question is how do you want to use Svelte? Inertia works with Svelte, so it would be a good way to go IMO.

If it was me here's what I would do.

  1. Setup your new app in Laravel 9, with Jetstream installed with Inertia and Vue.
  2. Migrate your JQuery app to the new Laravel install.
  3. Write a lot of tests.
  4. Refactor all the Vue parts of Jetstream to Svelte. Most of the Vue part of it can be published to your app then modified, all the auth stuff is actually handled by Fortify so it shouldn't really be too difficult to swap out.
  5. Refactor the JQuery as planned.

It might even be better to skip installing Jetstream and just write a Svelte version to start with, you can use the Jetstream codebase to give you an example of what to do.

1 like

Please or to participate in this conversation.