Here I have 3 inputs of mail, if an user wants to fill any 1 input with his input , then only that particular input which will be filled by the user should be sent to the backend. pls help!:)
const App =() => {
const [email,setEmail]=useState("");
const [emailEA,setEmailEA]=useState("");
const [emailFoo,setEmailFoo]=useState("");
const submitEmail={
Axios.post("http://localhost:3001/",{email,emailEA,emailFoo})
}
return (
<div className="App">
<Navbar/>
<Banner/>
<input
className="email"
value={email}
onChange={(e)=>{
setEmail(e.target.value)
}}
placeholder="Your email address"
/>
<TailorMadeServices/>
<WhyUs/>
<Testimonial/>
<Hearit/>
<EarlyAcc/>
<input
value={emailEA}
placeholder="Your Email Address"
onChange={(e)=>{
setEmailEA(e.target.value)
}}
className="eainput1"
/>
<Footer/>
<input
className="fmail"
placeholder="Your Email Address"
value={emailFoo}
onChange={(e)=>
{
setEmailFoo(e.target.value)
}
}
/>
</div>
);