At my first big boy job at a start up with only 50 users, we noticed we had cloud cost spikes about 20x larger than we were expecting. I remember spending all night debugging it, checking the requests as they go through.

The culprit? Someone left an async on a UseEffect with a variable that was regularly updated as a parameter.

In other words: every time a request was fired, the variable would change… so the function would sense the variable changed and fire it again, and so on.

Felt like a total hero.

Add Comment