JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="https://cdn.datatables.net/r/dt/jszip-2.5.0,pdfmake-0.1.18,dt-1.10.9,b-1.0.3,b-html5-1.0.3,b-print-1.0.3/datatables.css">
<script src="https://cdn.datatables.net/r/dt/jszip-2.5.0,pdfmake-0.1.18,dt-1.10.9/datatables.js"></script>
<script src="https://nightly.datatables.net/buttons/js/dataTables.buttons.min.js"></script>
<script src="https://nightly.datatables.net/buttons/js/buttons.print.min.js?1"></script>
<script src="https://nightly.datatables.net/buttons/js/buttons.html5.js?2"></script>
<table id="example" class="display" cellspacing="0"></table>

JavaScript

$('#example').DataTable({
    dom: 'tB',
    buttons: ['copyHtml5', 'csvHtml5', 'excelHtml5', 'pdfHtml5', 'print'],
    columns: [
        {
            title: 'Name',
            defaultContent: '',
            data: 'name'
        },
        {
            title: 'Age',
            data: 'age'
        }
    ],
    data: [
        {name: 'John Doe', age: 25},
        {name: null, age: 37}
    ]
});