I am trying to render the following JSX code. When I add the 'Yes' and 'No' text to complement the radio buttons, I get the following error...
<tr>
<td>Do you want the questions displayed in a random order?</td>
<td><input type="radio" name="random">Yes</input></td>
<td><input type="radio" name="random">No</input></td>
</tr>
Error:
input is a void element tag and must neither have children nor use dangerouslySetInnerHTML.
What am I doing wrong?
Use label
<label for="yes">Yes</label>
<input type="radio" id="yes" name="random"/>
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