D
D
Devero972021-06-15 15:59:08
Vue.js
Devero97, 2021-06-15 15:59:08

How to set dynamic tags in nuxt?

I'm using the new fetch hook. When you go to the page, a request is sent to display the page, while the skeleton is displayed (filling the content with the usual backgrand) while the page is loading. After that the page is displayed. But how do I write tags? When I go to the page, I have to set the title and description, but it gives me an error, because there is no title yet because of the fetch hook. I googled and didn't find a solution. Really it is necessary to return to asyncData?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stefan, 2021-06-15
@MEDIOFF

Well, if you get the title from the server, then it’s logical that nothing, v-if you can try so that there are no errors

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question