Skip to content
Skills Library
Programming · Building & coding

react-expert

/react-expert

Expert-level React development with hooks, performance optimization, state management, and modern patterns. Use when the user mentions frontend, hooks, JSX, TypeScript, or Next.js, or when the task involves Modern React, State Management, Forms, or Performance Optimization.

Repository
pcl ↗
Licence
Apache-2.0
Last repository change
10.09.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 10.09.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Expert-level React development with hooks, performance optimization, state management, and modern patterns. Use when the user mentions frontend, hooks, JSX, TypeScript, or Next.js, or when the task involves Modern React, State Management, Forms, or Performance Optimization.

Original author description

Expert-level React development with hooks, performance optimization, state management, and modern patterns. Use when the user mentions frontend, hooks, JSX, TypeScript, or Next.js, or when the task involves Modern React, State Management, Forms, or Performance Optimization.

How it works

  1. Best Practices
  2. Testing
  3. Approach
  4. Reference Documentation
Original SKILL.md headings · 160 lines, 483 words
SKILL.md preview
---
name: react-expert
version: 1.1.0
description: >-
  Expert-level React development with hooks, performance optimization, state management,
  and modern patterns. Use when the user mentions frontend, hooks, JSX, TypeScript, or
  Next.js, or when the task involves Modern React, State Management, Forms, or Performance
  Optimization.
category: frameworks
author: PCL Team
license: Apache-2.0
tags:
  - react
  - frontend
  - hooks
  - jsx
  - typescript
  - nextjs
allowed-tools:
  - Read
  - Write
  - Edit
  - Bash(npm:*, pnpm:*, yarn:*, bun:*)
  - Glob
  - Grep
requirements:
  node: '>=18.0.0'
  react: '>=18.0.0'
---

# React Expert

You are an expert React developer with deep knowledge of modern React (18+), hooks, performance optimization, state management, and the React ecosystem. You write clean, performant, and maintainable React applications following best practices.

## Best Practices

### 1. Component Composition

```tsx
// Bad - prop drilling
function App() {
  const [user, setUser] = useState(null);
  return <Layout user={user} setUser={setUser} />;
}

// Good - context for global state
function App() {
  return (
    <AuthProvider>
      <Layout />
    </AuthProvider>
  );
}
```

### 2. Avoid Inline Functions in JSX

```tsx
// Bad - creates new function on every render
<button onClick={() => handleClick(id)}>Click</button>

// Good - memoized callback
const handleClick = useCallback(() => handleClick(id), [id]);
<button onClick={handleClick}>Click</button>

// Or if no dependencies
<button onClick={handleClick}>Click</button>
```

### 3. Key Props in Lists

```tsx
// Bad - index as key
items.map((item, index) => <Item key={index} item={item} />);

// Good - stable unique identifier
items.map((item) => <Item key={item.id} item={item} />);
```

### 4. Conditional Rendering

```tsx
// Good patterns
{
  isLoading && <Spinner />;
}
{
  error && <ErrorMessage error={error} />;
}
{
  data && <DataDisplay data={data} />;
}
{
  condition ? <ComponentA /> : <ComponentB />;
}
```

### 5. TypeScript with React

```tsx
// Props interface
interface ButtonProps {
  variant: 'primary' | 'secondary';
  onClick: () => void;
  children: React.ReactNode;
  disabled?: boolean;
}

// Component with props
function Button({ variant, onClick, children, disabled = false }: ButtonProps) {
  return (
    <button
      className={`btn btn-${variant}`}
      onClick={onClick}
      disabled={disabled}
    >
      {children}
    </button>
  );
}

// Generic components
interface ListProps<T> {
  items: T[];
  renderItem: (item: T) => React.ReactNode;
}

function List<T>({ items, renderItem }: ListProps<T>) {
  return <>{items.map(renderItem)}</>;
}
```

## Testing

**React Testing Library:**

```tsx
import { render, screen, fireEvent, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';

describe('LoginForm', () => {
  it('should submit form with valid data', async () => {
    const handleSubmit = vi.fn();
    render(<LoginForm onSubmit={handleSubmit} />);

    await userEvent.type(screen.getByLabelText(/email/i), 'test@example.com');
    await userEvent.type(screen.getByLabelText(/password/i), 'password123');
    await userEvent.click(screen.getByRole('button', { name: /login/i }));

    await waitFor(() => {
      expect(handleSubmit).toHaveBeenCalledWith({
        email: 'test@example.com',
        password: 'password123',
      });
    });
  });

  it('should show error for invalid email', async () => {
    render(<LoginForm onSubmit={vi.fn()} />);

    await userEvent.type(screen.getByLabelText(/email/i), 'invalid');
    await userEvent.click(screen.getByRole('button', { name: /login/i }));

    expect(await screen.findByText(/invalid email/i)).toBeInTheDocument();
  });
});
```

## Approach

When writing React code:

1. **Use Functional Components**: Hooks over class components
2. **Keep Components Small**: Single responsibility principle
3. **Lift State Up**: Share state at the lowest common ancestor
4. **Memoize Wisely**: Use memo, useMemo, useCallback when needed
5. **Type Everything**: TypeScript for better DX and fewer bugs
6. **Test User Behavior**: React Testing Library over enzyme
7. **Optimize Performance**: Code splitting, lazy loading, virtual lists
8. **Follow Conventions**: ESLint, Prettier, consistent patterns

Always write clean, performant, and maintainable React code that provides excellent user experience.

## Reference Documentation

Detailed material lives alongside this skill and is read on demand:

- [Core Expertise](references/CORE_CONCEPTS.md) — Modern React (React 18+), State Management, Forms, Performance Optimization, Next.js Patterns
Files in this package (2)
  • SKILL.md 5 KB
  • references/CORE_CONCEPTS.md 17 KB

Versions

RepositoryScoreLicence
This page · personamanagmentlayer/pcl100Apache-2.0
Jeffallan/claude-skills100MIT
aAAaqwq/AGI-Super-Team100MIT
ecr17dev/claude-code-skills100MIT
aarvion-ai/stackwise-skills100MIT
wesleyegberto/software-engineering-skills100MIT
miaoge-ge/coding-agent-skills100MIT

Database snapshot: 13.11.2026 · package version 3488ec019454 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100react-patterns
    Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices. Use when building or reviewing React or Next.js components, state, or render performance.
  • 95frontend-patterns
    Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices. Use when building or reviewing React or Next.js components, state, or render performance.
  • 95frontend-patterns
    Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices. Use when building or reviewing React or Next.js components, state, or render performance.
  • 95frontend-patterns
    Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices. Use when building or reviewing React or Next.js components, state, or render performance.
  • 100developing-with-react
    React 18+ development with hooks, state management, component patterns, and Next.js integration. Use when building React applications or working with JSX/TSX components.
  • 100react
    React 18+ library for building user interfaces. Covers components, hooks, state management, and rendering patterns. USE WHEN: user mentions "React component", "useState", "useEffect", "hooks", asks about "building UI", "component lifecycle", "React rendering", "JSX" DO NOT USE…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.