This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
Allow configuration of React hooks rules #3877
arendjr
started this conversation in
Suggestions
Replies: 1 comment 1 reply
-
This rule has been designed to accept a configuration where a user can add additional "stable" - that's how the plugin calls them - hooks. Although we haven't documented it yet. We will do it once we are closer to having a decent implementation of the rule, there are still some missing bits. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was just looking into your implementation of the exhaustive deps rule for React hooks. It looks like a nice implementation, looking forward to it!
One thing I have been missing with the ESLint rules provided by the React team is the ability to configure additional (custom) hooks that I know will return stable results or which should also have their dependencies checked.
A common example would be for Redux’s
useDispatch()
hook, for which it is very annoying ifdispatch
needs to be needlessly specified as a dependency everywhere.Would you consider allowing the built-in configuration to be extended in Rome?
Beta Was this translation helpful? Give feedback.
All reactions