From ef8c38749216ba8eb5918e398d12f3e48663f56f Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 3 Apr 2019 01:05:21 +0300 Subject: react-hooks/exhaustive-deps --- vnext/.eslintrc | 3 ++- vnext/src/components/Avatar.js | 2 +- vnext/src/components/UserInfo.js | 7 ++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/vnext/.eslintrc b/vnext/.eslintrc index f7aa66d1..6d200c92 100644 --- a/vnext/.eslintrc +++ b/vnext/.eslintrc @@ -63,6 +63,7 @@ "jest/prefer-to-have-length": "warn", "jest/valid-expect": "error", - "react-hooks/rules-of-hooks": "error" + "react-hooks/rules-of-hooks": "error", + "react-hooks/exhaustive-deps": "warn" } } diff --git a/vnext/src/components/Avatar.js b/vnext/src/components/Avatar.js index 64c16ead..dc2050ce 100644 --- a/vnext/src/components/Avatar.js +++ b/vnext/src/components/Avatar.js @@ -27,7 +27,7 @@ function Avatar(props) { isMounted = false; }; } - }, [props.user]); + }, [props.user, user.uid, user.uri]); return (