I want to add a <input>
element, more specifically a checkbox, in my table. The following works:
<tbody key={rule._id}>
<tr>
<td>{rule.deviceId}</td>
{
<input
name="isEnabled"
type="checkbox"
checked={rule.enabled}
/>
}
<td>{rule.name}</td>
</tr>
</tbody>
but it produces an error in the console: <input> cannot appear as a child of <tr>
Is there a 'proper' way to do this?