How it works...

Because React.PureComponent implements the shouldComponentUpdatelife cycle method internally, it doesn't update the Button component because its state or props have not changed. It does, however, update the Text component because shouldComponentUpdate returns true by default, telling React to update the component, even though its props or state have not changed.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.237.172