We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- React
- Forms
- Contact Form
- Discussions
Contact Form
Contact Form
Sort by
recency
|
20 Discussions
|
Please Login in order to post a comment
React is such a powerful and flexible JavaScript library for building user interfaces! cricket betting exchange
Best Solution
const handleSubmit = (e) => { e.preventDefault(); if((name&&email&&message)==""){ setError("All fields are required.") } else{ setSubmittedData({name,email,message}) setName("") setEmail("") setMessage("") }
}
I don't believe this... I constantly kept failing the first test -> "displays error message when fields are empty and submit is clicked", and couldn't figure out what is wrong... in the end, I found the problem, and it seems I copied the error message without the dot (.) at the end, and that was causing the test to fail... aaggghhh
Solution: