useEffect(() => {
async function getTok() {
await Gettestimon();
alldoc.map(forget => console.log(forget.name));
setcondi(true);
// eslint-disable-next-line react-hooks/exhaustive-deps
}
getTok();
}, []);
Whenever I compile the highlighted code, it says my function gettestimon which stands for getting a testimonial, not something else, is not imported in effect's, but then it ends up working anyway. I would like to know how to fix this, but I read somewhere and added:
// eslint-disable-next-line react-hooks/exhaustive-deps
How can I fix this?
The exact error is:
React Hook useEffect has a missing dependency: 'Gettestimon'. Either include it or remove the dependency array.eslintreact-hooks/exhaustive-deps
This is the website where it is used: