-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSR - Hydration text mismatch #209
Comments
You can try use <div class="color-theme-switcher">
<ClientOnly>
<SfIcon
:icon="iconName"
class="color-theme-switcher__icon"
/>
<span class="color-theme-switcher__text">
Theme
</span>
<SfToggleSwitch
v-model="isDark"
class="color-theme-switcher__toggler"
/>
<template #placeholder>
<div class="color-theme-switcher__placeholder" />
</template>
</ClientOnly>
</div> |
@Kolobok12309 Then on page refresh that content inside
|
@TsotMe Most powerful way is to use cookie and http header for ssr, and if both of them missing, use ClientOnly. Fulfillment without ClientOnly you can try use css( but I don't like css for this cases), or you get flashes between render and mount |
It seems cookie storage is merged but this issue is not fixed. |
On server it not read color because color is stored in local storage and not cookie
The text was updated successfully, but these errors were encountered: