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.
consthandleSubmit=(e)=>{e.preventDefault();// TODO: Add logic to validate inputs and display submitted data// HINT: You can use the setError function// HINT: You can use the setSubmittedData function as below// setSubmittedData({ name, email, message }); if(!name||!email||!message){setError("All fields are required.");}else{setSubmittedData({name,email,message});setName("");setEmail("");setMessage("");setError("");// Clear any existing error}};``
Cookie support is required to access HackerRank
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 →