Mine is that the useState hook is an actual plague on the entire React ecosystem. Regardless of your opinions of React, if you wanna use something then use it right.

  • klankin@piefed.ca
    link
    fedilink
    English
    arrow-up
    3
    ·
    10 days ago

    Damn, I was gonna disagree but you bring up some good points.

    I really need to get into functional programming.

    • Ephera@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      9 days ago

      Functional programming is definitely worth a look in this regard as well, but what really drove this home for me is Rust.

      Its ownership+borrowing concept is exactly that, it enforces that you’ve got one place where an object is managed and in particular mutating can only be done in at most one place.
      Obviously, there’s also ways to get out of that, in case you do want some memory managed centrally, but it just isn’t the default.