I am currently using useEffect and I get this error below
"WARNING in src\newComponents\jobSearch\UseFetch.js Line 36:8: React Hook useEffect has a missing dependency: 'fetchData'. Either include it or remove the dependency array react-hooks/exhaustive-deps "
Here is my function
const fetchData = async () => {
setIsLoading(true);
try {
const response = await axios.request(options);
setData(response.data.data);
setIsLoading(false);
} catch (error) {
setError(error);
console.log(error)
} finally {
setIsLoading(false);
}
};
useEffect(() => {
fetchData();
}, []);
Can you please help me out