My Darkest Fantasy... Laravel Livewire + Vue (Instead of Alpine) would be beautiful...

Video thumbnail

Fantasizing with Combinations

I don't want to give a strict opinion, because there's really nothing concrete, but I do like to fantasize a bit about interesting combinations between technologies I use in Laravel.

For example, after the channel's latest videos about Inertia, I'd love to imagine an integration between Livewire and Inertia or Vue. It would be interesting to see how we could merge Vue's reactivity with Livewire's capabilities, although I still don't have a totally defined concept of how this would work.

Inertia: just a change from Blade to Vue

The basic idea of Inertia is very simple: instead of returning a Blade, Laravel returns a Vue component. That's all.

  • It's easy to start.
  • It allows you to use Vue without separating the frontend and backend into different projects.

Livewire: Laravel Components with “Vitamins”

Livewire, on the other hand, is more complete and complex:

  • It not only returns components, but "vitamins" them with reactivity.
  • It integrates Alpine.js, adding an extra layer for frontend interactions.
  • This makes it a bit more difficult to master than Inertia, but more powerful for certain tasks.

Recommendations based on knowledge

  • If you don't know Vue: Livewire is easier to start.
  • If you know Vue: Inertia is more natural and direct.

Personally, Vue is the only client-side framework I use; I don't work with React or Angular, and so far, it has been enough for me.

My Fantasy: Livewire + Vue or Improved Inertia

  • Alpine is very limited; I see it almost as a "joke" for small interactions.
  • The choice of Alpine for Livewire makes sense: it's useful for specific animations and simple interactions.

But, fantasizing: it would be interesting to:

  1. Use Livewire with Vue, combining reactivity and component reusability.
  2. Have Inertia inherit Livewire features, such as reusability and property communication (wire:model vs v-model).

When it's not necessary to use Vue

  • For traditional or simple forms: Livewire + Alpine is enough.
  • For simple validations or full duplex communication: Vue is not needed.

When Vue is useful

  • Complex forms with animations based on user selections.
  • Interfaces with many dynamic interactions, for example:
    • Social networks.
    • Sharing animated content.
    • Visual plugins with bubbles, transitions, and effects.

In these cases, Alpine falls short, and Vue is much more powerful and flexible.
Furthermore, Vue's documentation and community facilitate the implementation of advanced functionalities, while the search for plugins in Alpine can be more limited.

I agree to receive announcements of interest about this Blog.

I'm talking about a combination I would love to see between the versatility of Livewire and the ability to use Vue.

| 👤 Andrés Cruz

🇪🇸 En español