This lesson is for subscribers
You've completed the free preview. Subscribe to unlock every lesson in every course.
Why console.log(count) after setCount(count + 1) shows the old value—the component hasn't re-rendered yet.
You've completed the free preview. Subscribe to unlock every lesson in every course.