setup-react-compiler
Installation
SKILL.md
Setup React Compiler
Repo/code changes: run /deslop before commit, push, PR, or merge.
Run /read-the-damn-docs before pinning current React Compiler or Rsbuild integration syntax.
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