Courses

Livewire 3 for Beginners with Laravel 12 Starter Kit

SPA with wire:navigate

Summary of this lesson:
- Enabling SPA experience with `wire:navigate` in Livewire v3
- Updating page content without a full reload
- Reloading scripts with `data-navigate-track` when needed

These days, many applications are built as single-page applications (SPA). Livewire v3 offers this experience, with wire:navigate syntax.

It is heavily used in the Livewire Starter Kit, which we will cover in the next section, so here's a quick lesson for you to understand the wire:navigate.


Basic Usage

To use this feature, you just need to add a wire:navigate directive to the navigation links. For example, if we have a couple of routes.

Route::get('posts', \App\Livewire\ShowPosts::class);
Route::get('posts/create', \App\Livewire\CreatePost::class);
Route::get('users', \App\Livewire\ShowUsers::class);

Then we add wire:navigate to each...

The full lesson is only for Premium Members.
Want to access all 19 lessons of this course? (91 min read)

You also get:

  • 73 courses
  • Premium tutorials
  • Access to repositories
  • Private Discord