Skip to content

Fix theme hydration warnings caused by mismatched server/client theme state#82

Open
elizabetheonoja-art wants to merge 2 commits into
aid-linkk:masterfrom
elizabetheonoja-art:fix/theme-hydration-warnings
Open

Fix theme hydration warnings caused by mismatched server/client theme state#82
elizabetheonoja-art wants to merge 2 commits into
aid-linkk:masterfrom
elizabetheonoja-art:fix/theme-hydration-warnings

Conversation

@elizabetheonoja-art

Copy link
Copy Markdown

Summary

Updates the ThemeProvider in theme-provider.tsx with explicit next-themes configuration to eliminate React hydration warnings caused by theme mismatch between server and client renders.

Changes

  • Added attribute="class" for CSS class-based theme control
  • Added defaultTheme="system" for stable server-side initial theme
  • Added enableSystem to respect browser preference consistently
  • Added disableTransitionOnChange to prevent theme flash during hydration

Closes #79

JerryIdoko added 2 commits June 18, 2026 23:23
…bleSystem, and disableTransitionOnChange

Configures ThemeProvider with:
- attribute="class" for CSS class-based theme control
- defaultTheme="system" for stable server-side initial theme
- enableSystem to respect browser preference
- disableTransitionOnChange to prevent theme flash on hydration

Closes aid-linkk#79
- Added @typescript-eslint/eslint-plugin as a dev dependency and
  registered it in the plugins array so the referenced rules resolve
- Added passWithNoTests: true to jest config so test step exits
  successfully when no spec files exist yet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix theme hydration warnings caused by mismatched server/client theme state

1 participant