From bd1d4832c0127cbf4b183133878aabe1089147ea Mon Sep 17 00:00:00 2001 From: Sophie Alpert Date: Fri, 2 Nov 2018 10:29:42 -0700 Subject: [PATCH] Clarify when cleanup effect runs with [] deps Fixes #1348. --- content/docs/hooks-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/hooks-reference.md b/content/docs/hooks-reference.md index 2cac0517..afc3d373 100644 --- a/content/docs/hooks-reference.md +++ b/content/docs/hooks-reference.md @@ -149,7 +149,7 @@ useEffect( Now the subscription will only be recreated when `props.source` changes. -Passing in an empty array `[]` of inputs tells React that your effect doesn't depend on any values from the component, so that effect would run only on mount and unmount, never on updates. +Passing in an empty array `[]` of inputs tells React that your effect doesn't depend on any values from the component, so that effect would run only on mount and clean up on unmount; it won't run on updates. > Note >