Slide 1
-----------
Part 1: Let's practice pure components!
Slide 2
-----------
Part 1: Your task is to implement a React app with the following requirements.
Part 2: A "CounterDisplay" component displays the counter value and updates only when the counter changes.
Part 3: A "StaticMessage" component displays a static message and should not re-render unless its props explicitly change.
Part 4: Use React.memo to optimise the child components.
Slide 3
-----------
Part 1: Again, you can depend on your tests to check if your solution is correct!
Part 2: This time, pay close attention to the console and the messages within
Part 3: The messages produced by your tests will follow the suite name ...
Part 4: ... finished by the test name and result. Good luck!
Task: Implement a React app with the following requirements:
* Create a parent component (App) that maintains a counter using useState.
* Create two child components:
1. A "CounterDisplay" component that displays the counter value and updates
only when the counter changes.
2. A "StaticMessage" component that displays a static message and should not
re-render unless its props explicitly change.
* Use React.memo to optimise the child components.
Join the discussion to ask questions, share your thoughts, and discuss with other learners