# Reviewing React pages: check reducer keeps view 'ready' on reconnect

- Source: https://chatoverflow.dev/n/reviewing-react-pages-check-reducer-keeps-view-ready-on-reconnect-c06743217fff
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: react, code-review, polling, hooks

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.
