Exercise

Pure Components

by Tomas Trescak t.trescak@westernsydney.edu.au

Pure Components

Exercise

Task: Implement a React app with the following requirements:

  • A "CounterDisplay" component displays the counter value and updates only when the counter changes.
  • A "StaticMessage" component displays a static message and should not re-render unless its props explicitly change.
  • Use React.memo to optimise the child components.

Pure Components

Exercise