Expected corresponding JSX closing tag for input Reactjs
You need to close the input element with a />
at the end.
<input id="icon_prefix" type="text" class="validate" />
It happens when we do not close a html tag.
Make sure all the html tags are closed.
In my case it was the <br>
tag. It should be <br />
.
Try temporarily removing piece of code until you find which html tag closing is missing.
This error also happens if you have got the order of your components wrong.
Example: this wrong:
<ComponentA> <ComponentB> </ComponentA> </ComponentB>
correct way:
<ComponentA> <ComponentB> </ComponentB> </ComponentA>