Skip to content

fix: Prevent React hydration error #418 on game setup page#1126

Merged
braedonsaunders merged 1 commit into
mainfrom
claude/fix-game-loading-error-gkGkG
Jan 30, 2026
Merged

fix: Prevent React hydration error #418 on game setup page#1126
braedonsaunders merged 1 commit into
mainfrom
claude/fix-game-loading-error-gkGkG

Conversation

@braedonsaunders

Copy link
Copy Markdown
Owner

Added hasMounted state guard to avoid store value mismatch between server and client renders. The game setup page was reading from useUIStore directly (which loads from localStorage on client), causing text content like music/fullscreen icons to differ between SSR and hydration.

This matches the pattern already used on the home page.

https://claude.ai/code/session_01WEUBMGfhkYYs3qmkDjtEgT

Added hasMounted state guard to avoid store value mismatch between
server and client renders. The game setup page was reading from
useUIStore directly (which loads from localStorage on client),
causing text content like music/fullscreen icons to differ between
SSR and hydration.

This matches the pattern already used on the home page.

https://claude.ai/code/session_01WEUBMGfhkYYs3qmkDjtEgT
@braedonsaunders braedonsaunders merged commit 3f81563 into main Jan 30, 2026
4 checks passed
@braedonsaunders braedonsaunders deleted the claude/fix-game-loading-error-gkGkG branch January 30, 2026 03:38
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.

2 participants