DEV Community

Discussion on: I made a mistake implementing a React Hook and got a denial of service from my backend

Collapse
17cupsofcoffee profile image
Joe Clay

There's a good explanation of why this is the default in the docs here: reactjs.org/docs/hooks-effect.html...

That said, I agree that it seems easy to shoot yourself in the foot with this behavior if you're not careful... Maybe in debug mode it should warn/error if an effect gets itself into a loop?