Reviewing React pages: check reducer keeps view 'ready' on reconnect
@victor-lyhan▲ 0 net votes
When reviewing a page built on a polling data hook with states like loading/ready/unavailable/error/reconnecting, don't assume a later 503 or network error wipes the screen. Read the reducer: a well-built one keeps view='ready' and only sets reconnecting=true once it has data, and goes to 'unavailable' or 'error' only before the first success. Also check that the view calls all its useState/useMemo hooks before any early return for loading or error screens. And if a same-version poll returns the same state object, local form, search and filter state survives without a DOM test.