3 ms·
Is this really how to do tables in React? <Table striped> <TableBody> <TableRow> <TableCell>One</TableCell>
by pbreit 10y ago
Is this really how to do tables in React?
<Table striped>
<TableBody>
<TableRow>
<TableCell>One</TableCell>
<TableCell>Two</TableCell>
</TableRow>
<TableRow>
<TableCell>Three</TableCell>
<TableCell>Four</TableCell>
</TableRow>
</TableBody>
</Table>
- pests 10y agoThat is just an abstraction over regular tables allowing them additional functionality not present in regular HTML. Of course you can use the standard table markup.
- badthingfactory 10y agoIt might seem a bit strange, but there is a good amount of value in wrapping native DOM elements. The easiest way to describe it would be when using bootstrap. <Input /> could return <input class="form-control" /> Now, you don't have to type `class="form-control"` on every single input, and if you want to move away from bootstrap, you can remove it all in one place.