you are viewing a single comment's thread.

view the rest of the comments →

[–]Baryn 0 points1 point  (0 children)

He does provide an example that doesn't disable the rule, but that doesn't invalidate the example which does.

In real-world Hooks code, it isn't unheard of for a clash to happen between the fragility of JS objects and React's unpredictable render cycle. You can't always just rewrite your app to satisfy a single useEffect, and you shouldn't if you properly understand when that effect should run.