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.

you are viewing a single comment's thread
view the rest of the comments
[–] [S] 3 points 1 week ago (2 children)

I feel like useState and useEffect are 2 sides of the same coin

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 1 week 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 -.-

  • source
  • parent