So I have this app which has about 6 fetch function for different api endpoints, and I'm getting a warning error at my terminal - the same function names saying that i should include it in the dependency array of my useEffect. my functions are above the useEffects. the process is on first load I want them to fetch all, and then only fetches again if they pick another source or type - its doing the job that i want but why am I seeing these warnings?
useEffect(() => { fetchTtype() fetchSource() fetchSet() }, [chosenType, chosenSource]) useEffect(() => { setIsLoading(true) fetchUsers() fetchUserProblems() fetchAuthority() },[]) Line 111:8: React Hook useEffect has missing dependencies: 'fetchData', 'fetchSource', and 'fetchType'. Either include them or remove the dependency array
react-hooks/exhaustive-deps Line 118:7: React Hook useEffect has missing dependencies: 'fetchProblems', 'fetchAuthority', 'fetchUsers', and 'setIsLoading'. Either include them or remove the dependency array react-hooks/exhaustive-deps