Skip to content

Simple guide · Overview

Page status: HistoricalHistory group: Updates

Greek Language Hydration Lint Fix

This update keeps the ThemeSwitcher hydration-safe without violating the React hooks lint rule.

Visual overview

Primary diagram

System map

This update keeps the ThemeSwitcher hydration-safe without violating the React hooks lint rule.

Render the repository-owned system map when you need it.

Diagram is not rendered yet.

View as text
Greek Language Hydration Lint Fix

This update keeps the ThemeSwitcher hydration-safe without violating the React hooks lint rule.

flowchart TB
  accTitle: Greek Language Hydration Lint Fix
  accDescr {
    This update keeps the ThemeSwitcher hydration-safe without violating the React hooks lint rule.
  }
  A["Greek Language Hydration Lint Fix"] --> B["updates/README_GREEK_LANGUAGE_HYDRATION_LINT_FIX.md"]
  B --> C["Auto-generated placeholder diagram"]

Greek Language Hydration Lint Fix

Fullscreen diagram view.

This update keeps the ThemeSwitcher hydration-safe without violating the React hooks lint rule.

  • Replaced direct language setState in useEffect with useSyncExternalStore.
  • The server and first client render still use the default language snapshot, preventing hydration mismatches.
  • After hydration, the client reads the persisted language from localStorage and updates the UI.
  • Language changes still sync through the existing nutsnews:language-change event and cross-tab storage events.
  • web/app/components/ThemeSwitcher.tsx