react-ui-patterns

Implements React UI patterns for loading states, error handling, and async data fetching.

Updated Aug 10, 2026
One-click install
npx skills add https://github.com/Eng-suso/BK-GPT --skill react-ui-patterns-eng-suso
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: react-ui-patterns
Source: https://github.com/Eng-suso/BK-GPT/tree/main/.claude/skills/react-ui-patterns
Command: npx skills add https://github.com/Eng-suso/BK-GPT --skill react-ui-patterns-eng-suso

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? React components often flash loading spinners over cached data, silently swallow errors, or allow duplicate form submissions, producing confusing user experiences. This Skill provides concrete patterns and checklists to handle every UI state correctly. ## Core Features & Use Cases - Loading State Patterns: Decision trees and code examples for showing spinners or skeletons only when no data exists, avoiding refetch flashes. - Error Handling Hierarchy: Guidance on inline errors, toasts, banners, and full error screens, with a rule that errors are never swallowed silently. - Button and Form Patterns: Disabled-during-submit buttons, loading indicators, and complete form submission flows with validation feedback. - Use Case: When building a data-driven list page, apply the decision tree to render error, loading, empty, and populated states in the correct priority order. ## Quick Start Apply the react-ui-patterns skill to review my component and fix its loading, error, and empty state handling.

Frequently Asked Questions about react-ui-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle loading states in React without flashing spinners?▼

Show a loading indicator only when loading is true and no data exists yet. Checking loading alone causes spinner flashes on refetch when cached data is already displayed, so always gate the spinner on the absence of data.

When should I use a skeleton vs a spinner in React?▼

Use skeletons when the content shape is known, such as list or card layouts and initial page loads. Use spinners for unknown content shapes, modal actions, button submissions, and inline operations.

How do I prevent duplicate form submissions in React?▼

Disable the submit button while the mutation is in flight and show a loading indicator on it. Combining disabled={isSubmitting} with an isLoading prop blocks repeated taps and gives the user clear feedback.

What is the best way to show errors from React mutations?▼

Always surface mutation errors to users through an onError handler that triggers a toast, inline message, banner, or full error screen depending on severity. Logging to the console alone leaves users unaware that the action failed.

Why does my React list show a blank screen when empty?▼

The component likely lacks an explicit empty state for zero-item collections. Render a dedicated empty state with an icon, title, description, and optionally a call-to-action such as creating the first item.