Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
boredtofears
· 1y ago · 0 comments
How do you fetch and persist server side data without useEffect? (Assuming vanilla react)
Comments
[–]
crvst
1y ago
That’s probably the main real-world use case for useEffect. Dedicated third-party libraries like React Query obviously use useEffect under the hood as well
[–]
boredtofears
OP
1y ago
Yeah that's what I thought -- all the React codebases that I've worked in are riddled with `useEffect` for this reason primarily.
[–]
crvst
1y ago
I'm jealous, then. I've seen all kinds of deranged Rube Goldberg machines built using useEffect