You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
antlionguard
changed the title
useNuxt2Meta values didn't update if value is computed
useNuxt2Meta values didn't update if values are computed
Aug 5, 2022
we have this problem as well, very annoying. We found that if the head was already created before you call useNuxt2Meta it works. But if you try call useNuxt2Meta say in onServerPrefetch it doesn't work as needs a nuxt instance. So we created a component whose job is to call useNuxt2Meta and instantiate that when your head is ready from the parent. For example:
Environment
Windows_NT
v14.19.1
2.16.0-27616340.013f051b
[email protected]
webpack
srcDir
,alias
,server
,bridge
,head
,css
,styleResources
,plugins
,buildModules
,gtm
,modules
,postcss
,tailwindcss
,typescript
,sentry
,buefy
,image
,axios
,proxy
,render
,i18n
,router
,build
,serverHandlers
,devServerHandlers
@nuxt/[email protected]
,@nuxtjs/[email protected]
,[email protected]
,@nuxtjs/[email protected]
,@nuxtjs/[email protected]
,[email protected]
,@nuxtjs/[email protected]
,[email protected]
()
,@pinia/[email protected]
,@nuxtjs/[email protected]
,@nuxtjs/[email protected]
,@nuxtjs/[email protected]
,@nuxtjs/[email protected]
,@nuxtjs/[email protected]
,@nuxt/[email protected]
Reproduction
https://codesandbox.io/s/dreamy-maxwell-ir8qu1?file=/pages/index.vue
Describe the bug
Meta object values are not updating if object values (title, link, meta etc.) are computed.
Additional context
I cannot see browser title on codesandbox. Therefore i downloaded reproduction into my computer and i tested in locally.
Logs
No response
The text was updated successfully, but these errors were encountered: