setup-react-compiler
БесплатноЗапускает вложенные скриптыНе проверенInstall React Compiler with rsbuild and enforce compiler-friendly patterns via PostToolUse hooks. Flags manual memoization, derived state, useRef cache. Use…
от redpanda-data★ 34 звезды на GitHubОб этом скилле
Setup React Compiler
What This Sets Up
- babel-plugin-react-compiler with rsbuild
- PostToolUse hook flags:
useMemo/useCallback/React.memo(compiler handle), derived-state-via-useEffect,useRefas memo cache 'use no memo'escape hatch + auto-skip component library dirs- Annotation mode (
REACT_COMPILER_MODE=annotation) for brownfield: flag only files with"use memo"
See REFERENCE.md for post-compiler rules.
Steps
1. Install
bun add -D babel-plugin-react-compiler @rsbuild/plugin-babel --yarn
2. Configure rsbuild
import { pluginBabel } from '@rsbuild/plugin-babel';
export default {
plugins: [
pluginBabel({
babelLoaderOptions: {
plugins: [['babel-plugin-react-compiler', {
compilationMode: 'annotation', // 'infer' for greenfield
}]],
},
}),
],
};
Brownfield: set REACT_COMPILER_MODE=annotation in session-env.sh.
3. Component library
Add 'use no memo' to all .tsx in component library dir.
4. Hook
Copy scripts/react-compiler-check.sh + scripts/_hook-lib.sh -> .claude/hooks/. chmod +x. Add to PostToolUse (Edit|Write).
5. Verify
- rsbuild config has babel plugin
- Hook executable + configured
- Component library files have
'use no memo'
Установить setup-react-compiler в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл setup-react-compiler?
Install React Compiler with rsbuild and enforce compiler-friendly patterns via PostToolUse hooks. Flags manual memoization, derived state, useRef cache. Use when setting up React Compiler or post-compiler patterns.
Как установить скилл setup-react-compiler?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл setup-react-compiler запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic