DEV Community

Discussion on: You don't really need Apollo

Collapse
 
viralsangani profile image
Viral Sangani

Thank you so much, It helped a lot. I was not using useMemo, and getting in the loop.

Thread Thread
 
pabloabc profile image
Pablo Berganza

I'm glad I could help!

Yeah that's a little detail to remember. Since useSWR shallowly compares each argument, and each newly created object's reference is different, you have to make sure to pass the same reference (not create a new object) if you don't want a re-fetch.