Question · JavaScript and React course · Module 9: Modern React Hooks
Premature Optimization in React
Why is using React.memo on every component considered premature optimization?
Answer options
- React.memo causes errors in production applications
- React.memo adds the overhead of comparing props, which for simple components can be more expensive than the re-render itself
- React.memo is deprecated and replaced by useCallback
- React.memo only works with class components
You can check the correct answer by solving this task in the CodeWorlds game.