I am trying to render a button with fontawesome
icon using the below snippet:
<div className="form-group col-md-2">
<input type="button" className="btn btn-default">
<i className="fas fa-plus-circle"></i> add
</input>
</div>
But I keep getting this error:
input is a void element tag and must neither have
children
nor usedangerouslySetInnerHTML
.
What is the correct way to do it?