CONTACT US

    Use React.memo() wisely

    A spanner grips a nail and a hammer hovers above it, while a screw is next to the nail on a wooden surface, suggesting improper tool use. A yellow object is blurred in the background.

    Use React.memo() when:

     

    • You want to mimic PureComponent in function components.
    • Your component renders often
    • Your component is usually provided with the same props during re-rendering
    • Your component contains a decent amount of UI elements to reason props equally check

    Article link copied

    Close button