0

"React Hook useEffect has missing dependencies: 'getData', 'isAuthorized', and 'props'. Either include them or remove the dependency array. However, 'props' will change when any prop changes, so the preferred fix is to destructure the 'props' object outside of the useEffect call and refer to those specific props inside useEffect"

This is the warning I got when I'm trying to use useEffect. How can I solve this?

useEffect(() => {
        props.handleHeaderTitle("Approval State");
        getData();
        isAuthorized();
    }, [projectId])
Irushan
  • 125
  • 2
  • 10

0 Answers0