React in Practice · 30 min · 220 XP

Checkpoint: inventory explorer

Combine components, props, state and derived data in a filterable inventory without duplicating state.

This checkpoint starts with data and a blank editor. Sketch the component boundary and identify source state versus calculated values before writing JSX.

A good React model stores the smallest source of truth. The search text and checkbox value change over time, so they are state. The visible products and result count can be calculated from that state and the products prop during every render.

Loading your workspace…