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.

  • Endmaker@ani.social
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 month ago

    useState hook is an actual plague on the entire React ecosystem

    Personally, I find useEffect to be the real evil.

      • naught@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        ·
        1 month ago

        tbf useEffect is what fried even cloudflare a while back, oh and also me many times. Insanely easy to write once. Just as easy to forget a dependency or modify the function into creating an infinite loop. Or hell using useEffect(() => {}) i.e. an anonymous function instead of naming it so I have to read 30 LoC to figure out what it does only to realize it’s not even the effect I needed -.-