Due to Next.js hydration process trying to render on server first, then hydrate on client, data-active attribute depends on computedMode from useThemeMode which has the source of storage localstorage. The problem is that there is no valid computedMode on server.
Changes
[x] fix hydration error log caused by DarkThemeToggle
Due to
Next.js
hydration process trying to render on server first, then hydrate on client,data-active
attribute depends oncomputedMode
fromuseThemeMode
which has the source of storage localstorage. The problem is that there is no validcomputedMode
on server.Changes
DarkThemeToggle
Issue:
1156