Skip to content

Commit a32e5f0

Browse files
docs(readme): updated docs
1 parent 6c4ac4a commit a32e5f0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,4 +414,4 @@ module.exports = [
414414
[npm-version-svg]: https://versionbadg.es/jsx-eslint/eslint-plugin-react.svg
415415

416416
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/jsx-eslint/eslint-plugin-react
417-
[actions-url]: https://github.com/jsx-eslint/eslint-plugin-react/actions
417+
[actions-url]: https://github.com/jsx-eslint/eslint-plugin-react/actions

docs/rules/ensure-matching-remove-event-listener.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Enforces that every addEventListener should have a matching removeEventListener in the return statement of the same useEffect block (ensure-matching-remove-event-listener)
22

3+
💼 This rule is enabled in the following [configs](https://github.com/jsx-eslint/eslint-plugin-react#shareable-configurations): `all`.
4+
35
When adding "eventListeners" at the mounting phase of a component, sometimes developers forget to remove the "eventListener" in the cleanup function of the useEffect block. This can cause memory leaks in the react application:
46

57
> **Console error**: Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.

0 commit comments

Comments
 (0)