import React , { Component } from 'react'
class Login extends Component{
constructor(props){
super(props)
}
render(){
return(
<form className="login-form">
<h1>login</h1>
<div>
<div className="form-group">
<label for="name">
Name :
</label>
<input name="name" type="text" value="" placeholder="Your Name" />
</div>
<div className="form-group">
<label for="password">
Password :
</label>
<input name="password" type="Password" value="" placeholder="Password" />
</div>
<input type="submit">Submit</input>
</div>
</form>
)
}
}
export default Login
I think the issue is here,
//input is an empty tag and you have provided Submit as children here
<input type="submit">Submit</input>
It should be simply this,
<input type="submit" value="Submit" />
ravibagul91's answer is correct. input
is self-closing element. You cannot have children in it.
Alternatively, you may use button:
<button type="submit">Submit</button>
To this:
<input type="submit" value="Submit" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With