How to check the ssrContext in a Pinia store with Nuxt 3? #801
-
|
Hi, I would like to check the server side context in a Pinia Store with Nuxt 3. I tried: but the condition is always true. In my template file, I use ands it works properly. Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
if pinia.use(() => ({ $nuxtApp: useNuxtApp() })) |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for your answer The solution I was looking for is |
Beta Was this translation helpful? Give feedback.
Thank you for your answer
this.$nuxtworks.The solution I was looking for is
if (process.server) { /* */ }, don't need to use this.$nuxt.ssrContext here.