React Compiler can optimize components at compile time, eliminating the need to manually use useMemo, useCallback, and memo. You can use React Compiler in ReactLynx to enhance your application's performance.
Follow these steps to enable React Compiler for ReactLynx in Rspeedy:
Currently ReactLynx only supports target to version 17.
react-hooks/react-compiler to detect code that cannot be optimized. Please refer to React Compiler - ESLint Integration for configuration details.The React Compiler automatically analyzes your components and injects memoization logic, reducing the need for manual optimizations like useMemo, useCallback, or React.memo. This simplifies your codebase and can deliver significant performance gains during subsequent re-renders, particularly in update-heavy interfaces.
Because the compiler introduces additional runtime logic, it may slightly affect IFR performance or initial background-thread rendering. We recommend enabling React Compiler in cases where initial IFR performance is less critical, or where re-render efficiency and developer experience are the higher priorities.
We’re actively evaluating its impact in ReactLynx and welcome your experiments and feedback to help guide future improvements.