2026-10-25 02:03 UTC
I feel like useState and useEffect are 2 sides of the same coin
Replies (2)
-
@canaryWart@programming.dev 2026-10-25 02:15
might you even say “two perspectives of the same object”?
-
@naught@sh.itjust.works 2026-10-25 04:42
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 neede -.-