Async and its failure modesintermediate
Every await can reject; modelling idle, loading, success and error explicitly is what stops a slow network showing a blank screen with no explanation.
Fetch on mount, handle every state it can be in, and derive the rest. The five things every SPA interview tests.
It loads, it fails visibly, it filters without re-computing, and every row has a key.
Published in full, before you start — every point is one of these and there is nothing else.
Every await can reject; modelling idle, loading, success and error explicitly is what stops a slow network showing a blank screen with no explanation.
State is the data that changes while the page is open; useState is how a component remembers something between renders.
Re-sorting a thousand rows on every keystroke is why a table feels slow; useMemo tells React to only redo that work when the inputs actually change.
Anything that talks to a network can be slow or fail; a screen with no loading state and no error state is a screen that looks broken the first time the wifi drops.