kbowers-ibm commented on code in PR #2099:
URL:
https://github.com/apache/incubator-kie-tools/pull/2099#discussion_r1444695133
##########
packages/chrome-extension/src/app/components/common/customEffects.ts:
##########
@@ -27,7 +27,7 @@ export function useEffectAfterFirstRender(func: () =>
ReturnType<EffectCallback>
} else {
firstRender.current = false;
}
- }, deps);
+ }, [func]);
Review Comment:
Thanks @tiagobento, I've made the suggested changes. However ESLint is
complaining about this specific change with the following, "React Hook
useEffect has a spread element in its dependency array. This means we can't
statically verify whether you've passed the correct dependencies." Should I
just do [func, deps] instead of spreading the deps in the dependency array?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]