From 420c6c25db10b673e59f3d72ac58aa9b85d5c921 Mon Sep 17 00:00:00 2001 From: Vivek Kumar Date: Tue, 11 Apr 2023 19:24:38 +0530 Subject: [PATCH] added a comment --- src/components/Avatar.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/Avatar.js b/src/components/Avatar.js index 49fe4e3653e8..7aebb1d8fe68 100644 --- a/src/components/Avatar.js +++ b/src/components/Avatar.js @@ -70,6 +70,9 @@ function Avatar(props) { return; } setImageError(false); + + // We have not added the imageError as the dependency because effect is concerned with `imageError` only when the network state changes from offline -> online + // eslint-disable-next-line react-hooks/exhaustive-deps }, [props.network.isOffline]); useEffect(() => {