Themabewertung:
  • 0 Bewertung(en) - 0 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
Vue.js Strukturen und Konventionen?
#2
Eine Hilfreiche Antwort kam auf Stack Overflow:



Your question is quite loaded, but I'll try my best to point you towards some things.

1. It is better to have an API that can support pagination and other variable return types. I am quite unsure what you mean by "PHP functions from Axios", do you mean an endpoint that you built with PHP? Either way, if you are transitioning from PHP I would recommend building a REST API with Spring Boot (Java) or another MVC framework.

2. Vue Router is used to transition from one page to another for SPAs (single page apps) mainly. It is a very useful tool for routing the user from one page (each page being a Vue component in a way) to another. So I'd say "yes" to this.

3. You can do POST calls with Axios programmatically. If you have a simple POST that returns the status of something for example, then axios.post(status_endpoint).then(response => response.data) (response.data being the returned data from your endpoint) would give you the response data to use as you wish.
Schwarzer Humor ist wie essen, hat nicht jeder.
Zitieren


Nachrichten in diesem Thema
RE: Vue.js Strukturen und Konventionen? - von BastiBln - 08.10.2023, 18:01

Gehe zu:


Benutzer, die gerade dieses Thema anschauen:
1 Gast/Gäste