3 ms·
How do you fetch and persist server side data without useEffect? (Assuming vanilla react)
by boredtofears 2y ago
How do you fetch and persist server side data without useEffect? (Assuming vanilla react)
- crvst 2y agoThat’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 2y agoYeah that's what I thought -- all the React codebases that I've worked in are riddled with `useEffect` for this reason primarily.
- crvst 2y agoI'm jealous, then. I've seen all kinds of deranged Rube Goldberg machines built using useEffect
- deleted 2y ago[deleted]