▲ 363 ▼ Anon died on the "clang format bad" hill (programming.dev) submitted 1 week ago by danhab99@programming.dev to c/programmer_humor@programming.dev 544 comments fedilink hide all child comments 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 5 points 1 week ago (4 children) useState hook is an actual plague on the entire React ecosystem Personally, I find useEffect to be the real evil. permalink fedilink source hideshow 4 child comments replies: [–] SpaceNoodle@lemmy.world 12 points 1 week ago Personally, I find React to be the real evil. permalink fedilink source parent [–] danhab99@programming.dev [S] 3 points 1 week ago (2 children) I feel like useState and useEffect are 2 sides of the same coin permalink fedilink source parent hideshow 2 child comments replies: [–] canaryWart@programming.dev 2 points 1 week ago might you even say "two perspectives of the same object"? permalink fedilink source parent [–] naught@sh.itjust.works 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 -.- permalink fedilink source parent
[–] SpaceNoodle@lemmy.world 12 points 1 week ago Personally, I find React to be the real evil. permalink fedilink source parent
[–] danhab99@programming.dev [S] 3 points 1 week ago (2 children) I feel like useState and useEffect are 2 sides of the same coin permalink fedilink source parent hideshow 2 child comments replies: [–] canaryWart@programming.dev 2 points 1 week ago might you even say "two perspectives of the same object"? permalink fedilink source parent [–] naught@sh.itjust.works 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 -.- permalink fedilink source parent
[–] canaryWart@programming.dev 2 points 1 week ago might you even say "two perspectives of the same object"? permalink fedilink source parent
[–] naught@sh.itjust.works 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 -.- permalink fedilink source parent