updatePrimaryPalette and other styled mode theme utils on the server side (SSR) #3195
Unanswered
omnichronous
asked this question in
PrimeVue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey everyone, I'm using PrimeVue 4 in Nuxt with SSR enabled and my use case led me to an interesting question.
I'm trying to make different pages in my app use different presets (really just a different primary color). I tried all the utilities -
usePreset
,updatePreset
,updatePrimaryPalette
, etc, and I tried them in many different places - the setup function, a composable, a plugin, a middleware, but the result is always the same - the page is always rendered on the server side with the original theme colors and the new preset is only applied only once the page loads on the client side. This causes a flash of unstyled content, of sorts.Can anyone tell me what the "correct" way to manipulate the preset on the server side is?
Beta Was this translation helpful? Give feedback.
All reactions