|
|
|
|
|
by toastercat
1023 days ago
|
|
> Agreed, everyone who complains about dependency arrays almost certainly hasn't used the linting rule. Which linting rule? > That being said, I'm not sure that an API is well-designed if the only way to use it effectively is by forcing you to even know there is an eslint plugin to begin with, and then once you do know that, that means now you're being forced to add eslint to your project whether you like it or not. And sometimes eslint just stops working for who knows what reason, I have a developer on my team who's constantly dealing with issues where his eslint/prettier setup isn't running correctly. Yes, not to mention eslint is slow with large codebases. Fingers crossed for the Rust(?) rewrite. |
|
The only downside is that sometimes, the rule can end up being overly aggressive and tell you to add things which you explicitly don't want in your dependency array, but it's helpful probably 95+% of the time and not hard to opt out of or work around as needed.
[0] https://www.npmjs.com/package/eslint-plugin-react-hooks