dillon1000/react
Commit
Browse files [useEvent] Lint for presence of useEvent functions in dependency lists (#25512)
* [useEvent] Lint for presence of useEvent functions in dependency lists With #25473, the identity of useEvent's return value is no longer stable across renders. Previously, the ExhaustiveDeps lint rule would only allow the omission of the useEvent function, but you could still add it as a dependency. This PR updates the ExhaustiveDeps rule to explicitly check for the presence of useEvent functions in dependency lists, and emits a warning and suggestion/autofixer for removing the dependency.
Changed paths2 files
First-parent comparisonpackages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js ModifiedM packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…