Get a Performance Boost in React with PureComponent

1 · · June 27, 2019, midnight
In this article, we’ll interact with some visual learning tools to learn how PureComponent gives you an quick way to optimize your React apps. You may know that pure components are one of the top-level APIs in the React package, but what does it do? import React, { PureComponent } from 'react' class Foo extends PureComponent { // 👈 render() { //... } } PureComponent comes with a predefined shouldComponentUpdate lifecycle function that checks whether its props have changed before re-re...