I need, when a user clicks on a button, that React renders a table under said button. How to do it?
let a = '';
if (this.state.text) {
a =
<table border="1" width="40%" cellpadding="5">
<tr>
<th>Ячейка 1</th>
<th>Ячейка 2</th>
</tr>
<tr>
<td>Ячейка 3</td>
<td>Ячейка 4</td>
</tr>
</table>
} else {
a = ''
}