TypeError: Cannot read properties of undefined (reading 'map')
function List({ items }) {
return items.map((i) => <li>{i}</li>);
}Why it fails: items is undefined on the first render, before your data has loaded, so .map() has nothing to run on.
Suggested fix
function List({ items = [] }) {
return items.map((i) => <li key={i}>{i}</li>);
}