because setCount() is asynchronous, you can’t immediately access the updated state variable after calling the function.
handleClick is called -> component re-renders -> updated count state can be accessed (which is 4).
because setCount() is asynchronous, you can’t immediately access the updated state variable after calling the function.
handleClick is called -> component re-renders -> updated count state can be accessed (which is 4).
This is because React will “batch” multiple requests to update the state of components (and so to rerender them) together—that way if your app needs to make lots of small changes at the same time, React only needs to regenerate the DOM once, providing a significant performance boost.
So that's why it's called batching, it'll only use the most recent setState call for the actual state value because it changes the DOM once
inversion of control,
a framework calls custom code, rather than the usual other way around
like how an event driven framework calls custom GUI code
carnival attractions
I find it interesting this woman was included here, because her addition fills the curiosity of the townspeople, in a way their coming to see the angel could not. While the spider woman could talk about her experience and was given meatballs, on the other hand the angel could not communicate and was instead poked, stoned, branded, mistreated, exploited for money...
만나서 반갑습니다
in class we're using the formal polite form of "glad to meet you" but using the informal polite form of "Hello"