Optimize re-renderings by implementing shouldComponentUpdate and using some PureComponents