Can anybody tell me why this warning props in console?
React.createElement(
'div',
{ className: 'form-group has-feedback' },
React.createElement('label', { htmlFor:"lastname", className:"font-14"}, "Last Name"),
React.createElement(
"input",
{
id:"lastname", type: 'text',
className: 'form-control', placeholder: 'Last Name',
onChange: this.handleChange.bind(this, 'lname')
}
)
)
HTML elements such as <area /> , <br /> , and <input /> are void elements which are only self-closing without any content.
A void element is an element in HTML that cannot have any child nodes (i.e., nested elements or text nodes). Void elements only have a start tag; end tags must not be specified for void elements. In HTML, a void element must not have an end tag. For example, <input type="text"></input> is invalid HTML.
The br element is a void element. A br element must have a start tag but must not have an end tag.
I had the same error with tag below worked for me;
Make the input tags as self closing.
instead of
<input> </input>
use self closing tag.
<input />
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