5 Matching Annotations
  1. Apr 2025
    1. 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).

    2. 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

  2. Mar 2024
    1. 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

  3. May 2023
    1. 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...

  4. Nov 2022