CodingNic

Temperature Units & Persistent Preferences

Temperature Units & Persistent Preferences — Introduction

Temperature Units & Persistent Preferences 5 min read

Temperature Units & Persistent Preferences — Introduction

Temperature Units & Persistent Preferences

This module adds a preference that affects the entire data flow. The selected unit must be reflected in the button, sent to both API endpoints, used by the renderers, and restored after a refresh.

The starter already reads weatherUnit from localStorage; the lessons connect that state to actual requests and to the last loaded location.

By the end: the learner can switch between Celsius and Fahrenheit without losing the current city.

Start here: complete the implementation lessons in order. Each lesson assumes the checkpoint from the previous lesson is working.