im getting this error. why is it happening and how can i solve this?
React Hook useEffect has a missing dependency: 'getRecipes'. Either include it or remove the dependency array react-hooks/exhaustive-deps
and this is my code:
const App = () => {
/*....................*/
useEffect(() => {
getRecipes();
}, [query]);
const getRecipes = async () => {
const response = await fetch(
`https://api.edamam.com/search?q=${query}&app_id=${APP_ID}&app_key=${APP_KEY}`
);
const data = await response.json();
setRecipes(data.hits);
console.log(data.hits);
}
/*....................*/
}