Answer the question
In order to leave comments, you need to log in
How to make pagination if the data can only be requested from the page, not the component?
How to create a logical architecture, if in nuxt you can only request data before rendering from a page, and not a component according to such a structure
/components - here you can only access the store, so nuxt is arranged that you cannot get data before rendering from a component (
/pages - here is how you can get data from the database before rendering and put it in the store
For example, I have a Catalog component Which consists of two components Menu and Product List
I
would like to insert the Catalog component on different pages
what about pagination
, it will be in the Product list component
And if I insert a component into 5 different pages, then on all these pages I will have to fill in the store, and the logic will change somewhere, then I will have to change it on 5 pages (
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question