Back to skills
SkillHub ClubShip Full StackFull StackFrontend

optimizing-with-react-compiler

Imported from https://github.com/djankies/claude-configs.

Packaged view

This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.

Stars
0
Hot score
74
Updated
March 20, 2026
Overall rating
C2.2
Composite score
2.2
Best-practice grade
S96.0

Install command

npx @skill-hub/cli install djankies-claude-configs-optimizing-with-react-compiler

Repository

djankies/claude-configs

Skill path: react-19/skills/optimizing-with-react-compiler

Imported from https://github.com/djankies/claude-configs.

Open repository

Best for

Primary workflow: Ship Full Stack.

Technical facets: Full Stack, Frontend.

Target audience: everyone.

License: Unknown.

Original source

Catalog source: SkillHub Club.

Repository owner: djankies.

This is still a mirrored public skill entry. Review the repository before installing into production workflows.

What it helps with

  • Install optimizing-with-react-compiler into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
  • Review https://github.com/djankies/claude-configs before adding optimizing-with-react-compiler to shared team environments
  • Use optimizing-with-react-compiler for development workflows

Works across

Claude CodeCodex CLIGemini CLIOpenCode

Favorites: 0.

Sub-skills: 0.

Aggregator: No.

Original source / Raw SKILL.md

---
name: optimizing-with-react-compiler
description: Teaches what React Compiler handles automatically in React 19, reducing need for manual memoization. Use when optimizing performance or deciding when to use useMemo/useCallback.
allowed-tools: Read, Write, Edit
version: 1.0.0
---

# React Compiler Awareness

React Compiler (available separately) automatically memoizes code, reducing need for manual optimization. (verify use in project before using this skill)

## What React Compiler Handles

**Automatically memoizes:**

- Component re-renders
- Expensive calculations
- Function references
- Object/array creation

**Before (Manual Memoization):**

```javascript
function Component({ items }) {
  const sortedItems = useMemo(() => {
    return [...items].sort((a, b) => a.name.localeCompare(b.name));
  }, [items]);

  const handleClick = useCallback(() => {
    console.log('Clicked');
  }, []);

  return <List items={sortedItems} onClick={handleClick} />;
}
```

**After (React Compiler):**

```javascript
function Component({ items }) {
  const sortedItems = [...items].sort((a, b) => a.name.localeCompare(b.name));

  const handleClick = () => {
    console.log('Clicked');
  };

  return <List items={sortedItems} onClick={handleClick} />;
}
```

## When Manual Memoization Still Needed

**Keep `useMemo` when:**

- Extremely expensive calculations (> 100ms)
- Third-party libraries require stable references
- React Profiler shows specific performance issues

**Keep `React.memo` when:**

- Component re-renders are very expensive
- Props rarely change but parent re-renders often
- Verified performance improvement with Profiler

## Performance Best Practices

**Do:**

- Trust React Compiler for most optimizations
- Keep components small and focused
- Keep state local
- Use children prop pattern

**Don't:**

- Add premature memoization
- Over-engineer performance
- Skip measuring actual impact

For comprehensive React Compiler information, see: `research/react-19-comprehensive.md` lines 1179-1223.
optimizing-with-react-compiler | SkillHub