M
M
Maxim2021-02-15 14:26:59
Vue.js
Maxim, 2021-02-15 14:26:59

How to properly organize data fetching from the server in Nuxt, Vue?

Good afternoon, tell me how to do it right, when I go to the store page, I have 5 components, store data (name, cover, logo), latest news, photo reports (also the last 6), banners (last 15)

on internal pages, in addition to content there will be the same components, maybe there will be no banner component somewhere,

for example, the main page of the store:
- the store data component: logo, name
- the latest news
component - the latest photos
component - the latest banners component,

for example, the store news page:
- the store data component: logo , title
- latest news component

e.g. store products page:
- store data component: logo, title
- the latest news
component - the latest banners component

How to knock on the server from each component and pull out your data, or pull out all the data on the page and pass it to the components?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question