web-dev-projects icon indicating copy to clipboard operation
web-dev-projects copied to clipboard

how do i fix this? can you help me please

Open babyakk23 opened this issue 1 year ago • 3 comments

WARNING in [eslint] src\components\Banner.js Line 22:8: React Hook useEffect has missing dependencies: 'delta' and 'tick'. Either include them or remove the dependency array react-hooks/exhaustive-deps

webpack compiled with 1 warning

babyakk23 avatar Nov 14 '23 11:11 babyakk23

please delete your react dependency in your package.json file and re install your react with proper verion

nmitydv avatar Nov 21 '23 17:11 nmitydv

Use ESLint comment to ignore specific line // eslint-disable-next-line react-hooks/exhaustive-deps

Swekshas08 avatar Dec 05 '23 03:12 Swekshas08

1st way is to Include missing dependencies: useEffect(() => { // Your code }, [delta, tick]);

2nd way is to disable the lint rule useEffect(() => { // Your code // eslint-disable-next-line react-hooks/exhaustive-deps }, []);

whybhanu avatar Feb 15 '24 20:02 whybhanu