Back to Skills

react

verified

React development best practices and patterns, including modern data fetching with React 19.

View on GitHub

Marketplace

kfly8-claude-plugins

kfly8/claude-plugins

Plugin

react-skills

Repository

kfly8/claude-plugins
1stars

plugins/react-skills/skills/react/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/kfly8/claude-plugins/blob/main/plugins/react-skills/skills/react/SKILL.md -a claude-code --skill react

Installation paths:

Claude
.claude/skills/react/
Powered by add-skill CLI

Instructions

# React Development

Modern React development patterns and best practices.

## Data Fetching

Use React 19's `use` hook with `Suspense` for data fetching. Don't use `useEffect` for fetching data.

### Basic Data Fetching

```tsx
import { use } from "react";

const fetchUsers = fetch('/api/users').then(res => {
  if (!res.ok) {
    throw new Error(`HTTP error! status: ${res.status}`);
  }
  return res.json();
});

export function Users() {
  const users = use(fetchUsers);
  return (
    <ul>
      {users.map(user => <li key={user.id}>{user.name}</li>)}
    </ul>
  );
}
```

### Loading States with Suspense

Wrap components with `Suspense` for loading states:

```tsx
import { Suspense } from "react";
import { Users } from "./pages/Users";

export function App() {
  return (
    <Suspense fallback={<div>Loading...</div>}>
      <Users />
    </Suspense>
  );
}
```

## Guidelines

- Use the `use` hook for data fetching instead of `useEffect`
- Always wrap data-fetching components with `Suspense` boundaries
- Handle errors properly in your fetch promises
- Prefer declarative data fetching patterns over imperative ones

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
1069 chars