I am using eslint react plugin and I got an following warning.
React Hook useEffect has a missing dependency: 'setEmail'. Either include it or remove the dependency array
.
Here is the code snippet that occurs warrning.
useEffect(() => {
const email= localStorage.getItem('email');
if (email) {
setEmail(email);
}
}, []);