Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Recent versions of React have encouraged truly pure props-only functions to wrap them with React.memo(), which also adds the benefit of giving them the equivalent of a shallow-check `shouldComponentUpdate()` avoiding re-renders when the props are the same.

React.memo() is all the more useful of a signal in the Hooks world.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: