Make loading state In SPA Mode

How can i make a loading state while Go from one page to another using livewire and turbolinks.

i saw in the loading state section in the docs but i can’t find any things related with this question.

any ideas?

1 Like

This will likely be done in through turbolinks and javascript. You’ll have to listen to the turbolinks events and start/stop your loading indicator based on that. Look at the turbolinks documentation but turbolinks:request-start and turbolinks:request-end seem promising.

[Solved]

Thank you for helping me about.

after debugging i found there is already progress bar at the top of the page injected automatically when the page load, It appears automatically for any page that takes longer than 500ms to load

i can’t see it because of the network speed.

when i’m switch the mode to slow 3G i can see it clearly.

Info: https://github.com/turbolinks/turbolinks#displaying-progress

Thank you again for you help.