Laravelvideo· Apr 29, 2026· 2:58· 4,542 views on YouTube
React at a moment you like. The best moments light up here.
We haven't gotten to talk too much about Livewire V4, so here's four things that you need to know that's new within Livewire. All of these are taken from the Laravel News post that Caleb Porzio, creator of Livewire, wrote. Especially in this world of AI and agentic development, one of the things I like to talk about is knowing the names for the features that you want to build and what's actually capable and possible within Livewire. It's still one of my favorite ways to build applications within Laravel. So, the first new thing is kind of three things in one. It's how components are laid out. So, starting
with routes, you have a Livewire namespace that you're going to use instead of the route colon colon get. Now, there's opinions on how you can lay out your components. So, typically, you might have pages in a pages namespace, components go under everything else, but then you might have your own spaces like billing. While components by default start off with just one file, you don't have to do that or you don't have to have your AI do that as well. You can actually just pass the dash dash MFC to
create multi-file components or convert them at any time. Number two, your script and style tags can just live in your component. You don't have to have this at script or push the styles somewhere else. If you want to do it just in one component, you can. Number three, islands. This is a big one because it's helpful for you to know what these are so that as you write your code or have AI write your code for you, you know exactly when they come in handy. You can think of them as isolated regions within a component that update
independently. So, let's say you need to do an expensive back-end request, maybe exporting a large amount of data. Before, you would either have to push that into its own component so that way it doesn't try to reload everything else on the page. Now, you just wrap in this little island directive so that whatever is happening in here does not touch whatever other content that you might have. Since Livewire by default re-renders everything in a component when there's a specific wire action that
is being called on the server, this changes that. But, it also makes infinite scrolling so much easier. I'll be honest, it was hard to pick which one I should choose for number four because there's so much good stuff. Drag and drop out of the box, using the transition API now, or even just an easier way to show things on the client only with optimistic UI. But, the reason why I think number four is the JavaScript updates that come within Livewire V4 make building applications, especially with AI, so much easier, so much better. Why? Well, because now
there's standards for how your client-side JavaScript is going to interact with Livewire without having to call server in between. You can name elements and call them within JavaScript. You can return data with a JSON attribute method directly to JavaScript, essentially making it easy to filter on the client when you have a server-side search. Now, Laravel starter kits are already up to date within Livewire V4 and Flex UI, the free version that ships with those starter kits, already makes use of all the
things that Livewire gives you out of the box. But, as you build applications within Livewire, especially with AI assisted development, it's helpful to know what's capable, what's possible within Livewire, pretty much anything. So, that way you're not trying to reinvent the wheel.