You are viewing a single comment's thread. Return to all comments →
why my test is failing
const handleSubmit = (e) => { e.preventDefault(); if (!name || !message || !email) { setError("All fields are required") return } setSubmittedData({name,email,message}) setEmail("") setMessage("") setName("") setError("") };
Seems like cookies are disabled on this browser, please enable them to open this website
Contact Form
You are viewing a single comment's thread. Return to all comments →
why my test is failing
const handleSubmit = (e) => { e.preventDefault(); if (!name || !message || !email) { setError("All fields are required") return } setSubmittedData({name,email,message}) setEmail("") setMessage("") setName("") setError("") };