Build a widget that fetches a list of birth years on mount and renders them as a histogram of per-decade counts. Two ideas combine: the async-data lifecycle (loading → loaded, render nothing real until the data arrives) and bucketing — collapsing many raw values into a handful of grouped counts, then drawing each group as a bar scaled to the largest.
// A self-contained component. No props.
function App(): JSX.Element;
// Provided: an async source that resolves the raw years.
function fetchBirthYears(): Promise<number[]>;
[1991, 1995, 1999, 2001, 2003] → 1990s: 3 2000s: 2
counts → bars: the largest count fills the track (100%);
others scale proportionally — width = count / max * 100%.
useEffect(…, []). Show a loading state while data is null.Math.floor(year / 10) * 10 is the bucket key; tally counts per key.count / max, so the tallest bucket is full-width.