React component render is called multiple times when pushing new URL

If you are setting state at three different stages then the component will re-render three times as well.

setState() will always trigger a re-render unless conditional
rendering logic is implemented in shouldComponentUpdate().

(source)

You can implement logic in shouldComponentUpdate() to prevent unneeded re-renders if you are experiencing performance issues.

Leave a Comment

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