Course contentsShow
React
Lesson 437 of 2,39612. Rendering and BatchingPro lesson

Reading State Right After Setting It

Why console.log(count) after setCount(count + 1) shows the old value—the component hasn't re-rendered yet.

This lesson is for subscribers

You've completed the free preview. Subscribe to unlock every lesson in every course.