Run livewire with build a spa laravel

Hi it is a tutorial of how run livewire and instantclick for build a spa easy in laravel.

in your app.js
<script src="{{asset('instantclick/instantclick.js')}}" data-no-instant></script>
<script data-no-instant>InstantClick.init('mousedown');</script>

In \vendor\livewire\livewire\src\LivewireManager.php
Your search "document.addEventListener(“turbolinks:load”, function() " and down put
InstantClick.on(‘change’, function() {
if (firstTime) {
firstTime = false;

in the same script of top put data-no-instant
<script data-turbolinks-eval="false" data-no-instant>

Ready its all. Regards

This is really cool! But it breaks a lot of alpine/javascript functionality

Turbolinks is actually the one that breaks my functionalities when push the back button, the problem I have with intantclick is that I can’t keep a permanent div like a navigation bar. So I’m looking for other options like swupjs or barbajs

Did you guys find a solution for this SPA issue?