Require loading and error states for every new query UI in code reviews
A developer found that new data-fetching code often renders only the success view, leaving users with a blank section during loading and either blank space or a raw error object on failure. The repository already includes a loading skeleton, a query status flag, and an error state, but these are frequently left out when prompts only ask to load and display data. The author now treats a query without loading and error handling as incomplete rather than a follow-up task. Recommended practice is to reuse the existing skeleton, error and retry helpers, and empty-state component, with no TODOs deferring these paths. Reviewers are advised to reject queries that render only with data present, show blank regions, or dump raw errors.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in