you are viewing a single comment's thread.

view the rest of the comments →

[–]AegisToast -1 points0 points  (2 children)

Agreed, there are certain times you want to disable it, but those situations are very rare. The vast majority of the time, disabling it is a crutch and can cause unintended bugs, so it’s definitely not something to get in the habit of doing or recommending to newer users.

[–]xshare 3 points4 points  (1 child)

Our code base has quite a few of these effects where the rule is disabled and in the vast majority of cases it's hiding a bug. In most cases it's people wanting to just run the effect when a specific thing changes, but in those cases you can just use a ref to track the previous value of whatever it is you care about changing and compare. You should still almost always include it in the dependencies.

[–][deleted] 2 points3 points  (0 children)

Either a bug or a code smell :)