Skip to content
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

components(DarkThemeToggle): fix console warning #1172

Merged

Conversation

SutuSebastian
Copy link
Collaborator

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

  • fix hydration error log caused by DarkThemeToggle

Issue:
#1156

@SutuSebastian SutuSebastian added the 🐛 bug Something isn't working label Dec 6, 2023
@SutuSebastian SutuSebastian self-assigned this Dec 6, 2023
Copy link

vercel bot commented Dec 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
flowbite-react ✅ Ready (Inspect) Visit Preview Dec 6, 2023 7:17am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants