@andrew_mark try vue with inertia for spa. I don't know about writting spa with livewire because I use livewire for some part of page such as pagination, searching and some toggle tab etc. And most of the code are work with laravel route (page loading).
Ajax Load Component - Possible with Livewire?
I have an Laravel application with Livewire installed (Laravel / Jetstream / Livewire flavour). Pretty much all is working with exception to the following:
In one view (person), I have a table listing contact details for people. This is called (standard http request - NOT Ajax, though I would like it to be eventually) using /person and I have a corresponding route in my route file. I use Livewire to render('livewire.person), all loads as expected.
In the table for each row, I have a button, that will link to the details page for that row (a master / details kind of idea). Button code:
<button wired:click="test()">Details</button>
in the Table class I have a function as:
public function test(){ render('livewire.persondetails'); }
I am wanting the call to be Ajax, so that when the button is clicked, the render method renders the persondetails component to the view...like a SPA kind of feel...so no page loading.
I have gone through documentation and I can see no way of achieving this though I did see some mention of something called Turbolinks which provided this kind of functionality but, it is no longer included in Livewire.
Does in fact, Livewire have this functionality? Or, should I just use something like Axios and load content to the #app element that way instead.
Tips and hints gratefully received.
Please or to participate in this conversation.