DEV Community

Cover image for The React useEffect Bug That Cost Vercel $10,000 in API Bills (And How to Avoid It)
Akhilesh
Akhilesh

Posted on

The React useEffect Bug That Cost Vercel $10,000 in API Bills (And How to Avoid It)

guillermo rauch tweeted about a customer who deployed a nextjs app with a useeffect bug that cost them over ten thousand dollars in a few hours. the component was stuck in an infinite loop making thousands of api calls per second. the code looked innocent enough during review but the dependency array was wrong and it turned into a catastrophic production failure. netflix, shopify, and airbnb have all documented similar issues in their engineering blogs because this pattern is surprisingly common and incredibly expensive when it hits production at scale.
read about the real incidents and patterns to avoid: [Medium article link]

Top comments (0)