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
Since both useStoryblok and useAsyncStoryblok require it being used in setup, it is not possible to get proper routing when using app.vue instead of pages
The point behind me wanting to use my own routing instead of vue-router (which is what the pages folder in nuxt uses) is to save on bundle size. The way I need to do the route check might be a bit special since I need to support fetching from multiple CMS' in my application.
Expected Behavior
I would expect useStoryblok and useAsyncStoryblok to work properly in for example watchEffect so that I can watch on route changes.
Current Behavior
I get warnings about onMounted being used outside of setup, which I think is coming from the bridge.
Steps to Reproduce
Create a new Nuxt3 project from scratch.
Add fetching from storyblok using useStoryblok or useAsyncStoryblok inside a watchEffect.
Full disclosure, this could all just be from me trying to do weird stuff
The text was updated successfully, but these errors were encountered:
SebbeJohansson
changed the title
useStoryblok and useAsyncStoryblok doesnt support being used in app.vue since it only works properly in setup.
useStoryblok and useAsyncStoryblok doesnt support being used outside of setup because bridge needs onMounted
Jan 11, 2023
Since both
useStoryblok
anduseAsyncStoryblok
require it being used insetup
, it is not possible to get proper routing when using app.vue instead of pagesThe point behind me wanting to use my own routing instead of vue-router (which is what the
pages
folder in nuxt uses) is to save on bundle size. The way I need to do the route check might be a bit special since I need to support fetching from multiple CMS' in my application.Expected Behavior
I would expect
useStoryblok
anduseAsyncStoryblok
to work properly in for examplewatchEffect
so that I can watch on route changes.Current Behavior
I get warnings about
onMounted
being used outside of setup, which I think is coming from the bridge.Steps to Reproduce
useStoryblok
oruseAsyncStoryblok
inside a watchEffect.Full disclosure, this could all just be from me trying to do weird stuff
The text was updated successfully, but these errors were encountered: