K
K
kuzubina2021-11-01 17:11:48
Vue.js
kuzubina, 2021-11-01 17:11:48

How to get data in Nuxt.js?

What is the best way to get data for menu items in the header, at what stage? According to the instructions, asyncData is not called from the component and layout, but I just have a header in a separate component and connected immediately to the layout

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WapSter, 2021-11-01
@kuzubina

async fetch can be called in components and layouts
https://nuxtjs.org/docs/components-glossary/fetch/...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question