Menu

Derived State

Derived State

Derived state refers to values calculated from the existing state rather than being stored separately. It helps avoid unnecessary state variables.

In this project, the derived state is used to generate unit labels such as km, m, °C, and kg based on the selected conversion type. The UI automatically updates these values whenever the conversion state changes.