Next.js 16+ · Option
reactCompiler
The reactCompiler option enables React Compiler support in Next.js. It can automatically optimize component rendering and reduce the need for manual useMemo and useCallback.
Last updated
- Since
- v16.0.0
Syntax
reactCompiler: true
reactCompiler: { compilationMode: 'annotation' }
reactCompiler: { environment: { enablePreserveExistingMemoizationGuarantees: boolean } }In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
babel-plugin-react-compilercompilationModeuse memouse no memoenablePreserveExistingMemoizationGuaranteesuseMemouseCallbackReact.memo