Skip to content

Simple guide · Overview

Page status: HistoricalHistory group: Updates

Greek language hydration fix

This update fixes a React hydration warning that appeared after selecting Greek and reloading the home page.

Visual overview

Primary diagram

System map

This update fixes a React hydration warning that appeared after selecting Greek and reloading the home page.

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

Diagram is not rendered yet.

View as text
Greek language hydration fix

This update fixes a React hydration warning that appeared after selecting Greek and reloading the home page.

flowchart TB
  accTitle: Greek language hydration fix
  accDescr {
    This update fixes a React hydration warning that appeared after selecting Greek and reloading the home page.
  }
  A["Greek language hydration fix"] --> B["updates/README_GREEK_LANGUAGE_HYDRATION_FIX.md"]
  B --> C["Auto-generated placeholder diagram"]

Greek language hydration fix

Fullscreen diagram view.

This update fixes a React hydration warning that appeared after selecting Greek and reloading the home page.

ThemeSwitcher read nutsnews.web.language from localStorage during the initial client render. The server rendered the settings gear with English copy, while the first client render immediately used Greek copy. That changed attributes such as aria-label during hydration and caused a mismatch.

ThemeSwitcher now starts with the same default language used by server rendering, then reads the stored browser language after hydration. It also listens for NutsNews language change and storage events so the settings menu stays in sync after the page is hydrated.

  1. Select Greek from the NutsNews settings menu.
  2. Reload the home page.
  3. Confirm the page loads without the hydration warning.
  4. Open settings and confirm the settings labels still render in Greek after hydration.