mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
The useState lazy initialiser already runs on the client during hydration and reads the live `window.innerWidth`, so the post-mount handler() call was a no-op that triggered a setState inside useEffect. The eslint react-hooks/set-state-in-effect rule flags this pattern; removing it lets the resize + orientationchange listeners alone drive updates without a hydration-time double set. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>