Skip to content

Commit 09f7eca

Browse files
docs(docs): updated documentation for rule
updated documentation for ensure-matching-remove-event-listener rule
1 parent 27ff148 commit 09f7eca

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

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

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
💼 This rule is enabled in the following [configs](https://github.com/jsx-eslint/eslint-plugin-react#shareable-configurations): `all`.
66

7-
💼 This rule is enabled in the following [configs](https://github.com/jsx-eslint/eslint-plugin-react#shareable-configurations): `all`.
8-
97
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:
108

119
> **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)