I'm trying to understand when and how to mix the Laravel and Vue components in a web app.
- MPA where each blade view consists of a Vue component
Is it ok to have server-side routing and each view to consist of a Vue component ? Or in this case it would be better to make an SPA ? ( More specifically, here the question is whether there is a benefit of having server-side routing instead of client-side routing ? )
Taking as a reference stack overflow.
When you click on a Question the page refreshes which means that a GET request is sent to the back-end and where a new html file is sent to front-end.
When you create a Question, a new file is sent from the back-end and the page again reloads.
However, the content of the Question itself, seems to be dynamic because you can edit the Question or a Reply, but then again when you save the change, the page reloads.
- In this case, what is the benefit of communicating with the server with a GET/POST instead of making an AJAX call, taking into consideration that the content of the page is rendered on the client-side with JS which is not SEO-friendly ?
What are the upsides and downsides of this approach ?