Skip to content

State and persistence ​

The main page keeps a compact JavaScript state object containing the selected unit, theme, city, and an internal fetch token.

Persisted values ​

The application uses local storage keys including:

text
harmattan-unit
harmattan-theme
harmattan-city
harmattan-sound

This means a returning user does not have to reselect the same presentation preferences on every visit.

Defaults ​

The main page falls back to Celsius, dark theme, and the first city in the curated list. The current first city is Lagos.

Request ordering ​

fetchToken is an internal stale-response guard. When a newer city request begins, an older response can be ignored instead of overwriting the user's latest selection.

This is useful in a sequence such as:

text
User selects City A
User quickly selects City B
City B responds first
City A responds later

Without request ordering, the late City A response could incorrectly replace City B.

Persistence boundary ​

Local storage is browser-local. Preferences do not sync across devices because Harmattan currently has no account system or server-side profile.

Built around the Naija skies.