why some people use an empty arrow function in useState like this const [email, setEmail] = useState(() => {})?
Any kind of help would be appreciated
why some people use an empty arrow function in useState like this const [email, setEmail] = useState(() => {})?
Any kind of help would be appreciated
They are setting the email to an object which its value will later be set using another function. Try read more about Hooks Here