What is the React Compiler, and does it replace useMemo and useCallback?
Model answer
The React Compiler is a build-time tool that automatically memoises components and values so you need fewer manual useMemo, useCallback and React.memo calls. It works when your code follows the rules of React.
It is opt-in and its status and setup change, so check the official docs for your version. Manual memoisation can still be useful in some cases, such as effect dependency control.
Learn this topic
React Performance: memo, useMemo, useCallback and When Not to Use Them in the course React.js Full Course: Beginner to Advanced.
Sign in to add your own answer.