Google News
logo
ReactJS - Quiz(MCQ)
If a function component should always render the same way given the same props, what is a simple performance optimization available for it?
A)
Wrap it in the React.memo higher-order component.
B)
Implement the useReducer Hook.
C)
Implement the shouldComponentUpdate lifecycle method.
D)
Implement the useMemo Hook.

Correct Answer :   Wrap it in the React.memo higher-order component.