How to use shouldComponentUpdate with React Hooks?

Here is the documentation for React.memo

You can pass a function to control the comparison :

const Modal = React.memo(
  props => {...},
  (prevProps, nextProps) => prevProps.show === nextProps.show
);

when the function returns true, the component will not be re-rendered

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)