tiagobento commented on code in PR #2369:
URL:
https://github.com/apache/incubator-kie-tools/pull/2369#discussion_r1613499217
##########
packages/runtime-tools-process-enveloped-components/src/processDetails/envelope/components/ProcessDetails/ProcessDetails.tsx:
##########
@@ -100,18 +100,18 @@ const ProcessDetails: React.FC<ProcessDetailsProps> = ({
try {
const processResponse: ProcessInstance = await
driver.processDetailsQuery(processDetails.id);
processResponse && setData(processResponse);
- getAllJobs();
+ loadJobs();
setIsLoading(false);
} catch (errorString) {
setError(errorString);
setIsLoading(false);
}
};
- const getAllJobs = async (): Promise<void> => {
+ const loadJobs = useCallback(async () => {
const jobsResponse: Job[] = await driver.jobsQuery(processDetails.id);
jobsResponse && setJobs(jobsResponse);
- };
+ }, [processDetails, driver]);
Review Comment:
Hook dependency warning.
--
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]