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
{{ message }}
This repository was archived by the owner on Dec 5, 2024. It is now read-only.
π The bug
When using useMeta with useFetch inside setup() function title rolls back (to values from nuxt.config.js) wit ssr enabled after page was loaded
π οΈ Environment CodeSandbox Example
Fresh NuxtJS install with composition-api
With ssr: true in config - after opening page browser tab's title becomes config_title in 1-2 seconds. If i change title in index.vue - page hot reloads and everything is ok
With ssr: false browser tab's title is "Title here" as expected
If i move useMeta inside useFetch function then everything is ok, but after hot reload i have errors in console (so i think it's not ok to do this) and title becomes "config_title"
The text was updated successfully, but these errors were encountered:
The issue is the same as #383 - basically setting metadata within useFetch won't work because that function won't be called. Instead, you can locate a source of truth outside it, as in the examples in the issue above.
π The bug
When using useMeta with useFetch inside setup() function title rolls back (to values from nuxt.config.js) wit ssr enabled after page was loaded
π οΈ Environment
CodeSandbox Example
Fresh NuxtJS install with composition-api
package.json:
nuxt.config.js
pages/index.vue
π§© Case
yarn dev
http://localhost:3000/
With
ssr: true
in config - after opening page browser tab's title becomesconfig_title
in 1-2 seconds. If i change title in index.vue - page hot reloads and everything is okWith
ssr: false
browser tab's title is "Title here" as expectedIf i move useMeta inside useFetch function then everything is ok, but after hot reload i have errors in console (so i think it's not ok to do this) and title becomes "config_title"
The text was updated successfully, but these errors were encountered: