From 3f64033e6e41077f30161722772482a1dce3349d Mon Sep 17 00:00:00 2001 From: Rasmus Nilsson Date: Tue, 14 Jan 2020 23:29:56 +0100 Subject: [PATCH] Fix grammar (#2676) --- 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 fda18f90..2a3c881b 100644 --- a/content/docs/hooks-reference.md +++ b/content/docs/hooks-reference.md @@ -143,7 +143,7 @@ Although `useEffect` is deferred until after the browser has painted, it's guara The default behavior for effects is to fire the effect after every completed render. That way an effect is always recreated if one of its dependencies changes. -However, this may be overkill in some cases, like the subscription example from the previous section. We don't need to create a new subscription on every update, only if the `source` props has changed. +However, this may be overkill in some cases, like the subscription example from the previous section. We don't need to create a new subscription on every update, only if the `source` prop has changed. To implement this, pass a second argument to `useEffect` that is the array of values that the effect depends on. Our updated example now looks like this: