react-ui-patterns
Modern React UI patterns for loading states, error handling, and data fetching. Use when building UI components, handling async data, or managing UI states.
Author
Category
Development ToolsInstall
Hot:3
Download and extract to your skills directory
Copy command and send to OpenClaw for auto-install:
Download and install this skill https://openskills.cc/api/download?slug=sickn33-skills-react-ui-patterns&locale=en&source=copy
React UI Patterns — Modern Best Practices for React UI State Management
Skill Overview
React UI Patterns is a set of UI state management guidelines designed specifically for React developers. It covers core patterns such as loading states, error handling, and empty state design, helping you build components with excellent user experience.
Use Cases
Core Features
Common Questions
When should I show a spinner, and when should I show a skeleton?
Use a spinner when the content shape is unknown (e.g., modal actions, button submissions). Use a skeleton when the content shape is known (e.g., list layouts, card layouts, initial page loads). The core principle is: only show loading states when there is truly no data—avoid flicker when cached data is already present.
How do I avoid React loading state flicker?
Follow the “show loading only when there is no data” golden rule. The condition should be
if (loading && !data) rather than if (loading) alone. This way, when refetching with cached data, users can keep seeing the existing content instead of being shown a flickering spinner.Should errors always be shown to users?
Yes—errors must never be swallowed silently. Choose an appropriate presentation based on how severe the error is: field-level inline errors for form validation, toast notifications for recoverable errors, error banners for page-level errors, and full-screen error pages for unrecoverable failures. Users must know when an operation fails and how to retry.