Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

Excessive API requests caused by missing dependency in useEffect

4 replies
Last updated: Aug 23, 2024
I have a project that every time I run locally spikes my api request usage like crazy (25k+ request). I’m been back and forth with sanity over email but they mentioned taking it to slack
Aug 23, 2024, 2:55 PM
You would have to provide some more details for anyone to help you.
Have you checked the request logs? Do you have a rouge
useEffect
or similar? What kind of front-end do you have? What have you tried to narrow it down?
Aug 23, 2024, 5:08 PM
I’m almost positive it was my useeffect I had. It had no second argument so I think it was making a ton requests :melting_face:
Aug 23, 2024, 5:45 PM
classic! 😄
Aug 23, 2024, 5:51 PM
🙈 glad it didnt effect any other of my projects! this is my starter repo
Aug 23, 2024, 5:52 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?