How do you find the source of an infinite re-render?
beefsquatch @ beefsquatch @programming.dev Posts 11Comments 49Joined 2 yr. ago
beefsquatch @ beefsquatch @programming.dev
Posts
11
Comments
49
Joined
2 yr. ago
Deleted
Permanently Deleted
Sometimes you do want state variables in the dep array. Not super often but it does happen.
And you shouldn't just always use an empty array. That creates fragile components. Even for effects that you want to just run once. Always follow the eslint rule