React Functional Component props does not update
问题 I use a functional component to display these divs. I have also another component that uses the displayCounter component and keeps track of a state. My state is a counter and I have some buttons to increase and decrease the counter. Let's say that the state is state = { counter: 0 } The div with the Example 1 does not display the changes of the counter. But the div with Example 2 works fine? So when I click to increase button div 1 always displays 0, but div 2 works fine. Can somebody explain