react-ui-patterns

Standardize loading, error, and data-fetching patterns in React UI components.

Updated Jul 30, 2025
One-click install
npx skills add https://github.com/tmarsbr/portifolio --skill react-ui-patterns-tmarsbr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-ui-patterns
Source: https://github.com/tmarsbr/portifolio/tree/main/skill-ux/skills/react-ui-patterns
Command: npx skills add https://github.com/tmarsbr/portifolio --skill react-ui-patterns-tmarsbr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

React UI development often suffers from inconsistent loading states, unclear error messaging, and ad-hoc data-fetching patterns across components. This Skill provides a cohesive set of patterns to standardize how loading, errors, skeletons, and data-fetching flows are implemented.

Core Features & Use Cases

  • Loading State Patterns: show loading indicators only when there is no data, use skeletons for initial content, and avoid flashing spinners on refetch.
  • Error Handling Patterns: surface errors clearly with retry options, reusable error components, and consistent messaging.
  • Empty States & User Feedback: provide explicit empty states for lists and ensure buttons and forms reflect async status.
  • Form Submissions & Interactions: robust patterns for form submission, validation feedback, and user notifications.
  • Anti-Patterns & Best Practices: avoid showing spinners for cached data, never swallow errors, and favor explicit, actionable feedback.

Quick Start

Implement a reusable React UI pattern component that shows a skeleton during data fetch, an error state on failure, and a content view when data is ready.

Frequently Asked Questions about react-ui-patterns

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

FAQPage Schema
How do I prevent spinner flashing on data refetch in React?

To prevent spinner flashing during React data refetching, show loading indicators only when data is absent. Use skeleton placeholders for initial loads and avoid displaying spinners when updating cached data.

What is the best way to handle error states in React data fetching?

The best way to handle React data fetching errors is to never swallow errors and surface them explicitly. Implement reusable error components with consistent messaging and retry options to provide actionable user feedback.

When should I use skeleton loaders versus spinners in React UI?

Use skeleton loaders in React UI for initial content loading to maintain layout structure, while spinners suit quick actions. Avoid showing either for cached data to prevent UI flashing on refetch.

How do I manage form submission and async button states in React?

Manage React form submission and async button states by ensuring buttons reflect their async status. Apply robust patterns for validation feedback and user notifications to provide explicit, actionable feedback during submission.

How do I implement an explicit empty state for React lists?

Implement explicit empty states for React lists by providing dedicated UI components when data fetching returns no results. This ensures clear user feedback instead of displaying broken layouts or ambiguous loading indicators.