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.

  • Ephera@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    5 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.