Differentiating SSR from Client side requests with Pinia...
I'm using Nuxt 3.10.3, apollo/client 3.9.6., and pinia 2.1.7. All of my pages make API requests via the
CatalogStore
pinia store.4 Replies
For example, my
pages/categories/[...category_slug.vue
page calls the following action in my pinia store:
In pages/categories/[...category_slug.vue
I have the following:
Note the onServerPrefetch
lifecycle, and the watchEffect
. They both call thru to CatalogStore.fetchProductBySlug
action previously mentioned.I see the following error in JS console:
Is this something I can safely ignore? If not, how can I resolve it without writing duplicate code and while still using pinia store to cache results on the front-end, as the user navigates thru pages on the SPA? I am new to SSR. The docs indicate that its not recommended, but do not indicate why...
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View