title: Jquery Datatable Buttons Not Showing Up On React js
body: <p>I initialized Jquery Datatables in my react app and it works perfectly fine, except that the buttons aren't showing up.
  Here's my code:</p>
  
  <p>I tried this at first and it works but it doesn't display the buttons.</p>
  
  <pre><code>import $ from 'jquery';
  import JSZip from 'jszip';
  window.JSZip = JSZip;
  
  import 'datatables.net-bs4';
  import 'datatables.net-responsive';
  import 'datatables.net-buttons-bs4';
  import 'datatables.net-buttons/js/buttons.colVis';
  import 'datatables.net-buttons/js/buttons.html5';
  import 'datatables.net-buttons/js/buttons.flash';
  import 'datatables.net-buttons/js/buttons.print';
  </code></pre>
  
  <p>Next, I tried the code below as well, the error it throws didn't allow my react app to render. It complained about this <code>Uncaught TypeError: Cannot set property '$' of undefined
      at DataTable</code></p>
  
  <pre><code>import $ from 'jquery';
  const JSZip = require('jszip');
  window.JSZip = JSZip;
  
  require('datatables.net')();
  require('datatables.net-responsive')();
  require('datatables.net-buttons')();
  require('datatables.net-buttons/js/buttons.colVis')();
  require('datatables.net-buttons/js/buttons.html5')();
  require('datatables.net-buttons/js/buttons.print')();
  </code></pre>
  
  <p>Finally, how I initialize my datatable: </p>
  
  <pre><code>var table = $('#dynamic_table').DataTable({
            'lengthChange': false,
            'buttons': [ 'copy', 'excel', 'pdf', 'colvis' ],
  });
  table.buttons().container().appendTo( '#dynamic_table_wrapper .col-md-6:eq(0)' );
  </code></pre>
  
  <p>I came across a similar question <a href="https://stackoverflow.com/questions/49618168/datatables-button-through-react-app">Datatables button through React App</a>, but it didn't solve my problem. 
  Without the buttons to export into excel the whole purpose of my using this plugin is defeated. Can I get a little help?</p>