likyh opened a new issue, #3334: URL: https://github.com/apache/incubator-devlake/issues/3334
## What and why to refactor https://github.com/apache/incubator-devlake/blob/7b0199a6d8557d4f18b73200d619a96d10df0163/config-ui/src/pages/blueprints/create-blueprint.jsx#L501-L505 delete set function in deps. Don't add the set functions in deps unless they are necessary by some detail reason. Delete them will not trigger the linter's warning. An example: In one file: ```js const [a, setA] = useState(..) const updateColumnInA = useCallback( (key, value) => (setA[key] = value), [setA] ) ``` In another fileļ¼ ``` const [b, setB] = useState(..) useEffect(() => { updateColumnInA('xxxxx', b) }, [b, updateColumnInA]) ``` Once a changed, b will be updated. It is not necessary and sometimes it will lead to an endless loop. ## Describe the solution you'd like check all deps and try to delete them depending on the set function unless they are necessary. -- 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]
