useEffect(()=>{const identifier=setTimeout(()=>{setFormIsValid(enteredEmail.includes('@') && enteredPassword.trim().length>6)},500)return ()=>{console.log('Cleanup');clearTimeout(identifier);}},[enteredEmail,enteredPassword])
No comments:
Post a Comment