JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.js"></script>
<!-- 
  Bootstrap docs: https://getbootstrap.com/docs
-->


<p>
Please open the console so you can see the error!
</p>

<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
  Press me please
</button>

<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
      </div>
      <div class="modal-body">
        <div class="content-stuff">
        <p title="I'm a tooltip" data-toggle="tooltip">Here is some text</p>
        </div>
              
        <button class="btn btn-primary" name="destroytooltip">
          Get rid of content above this and dispose of  tooltips
        </button>
        <button id ="closebtn" style="display:none;" type="button" class="btn btn-secondary" data-dismiss="modal">Now close it</button>
      </div>
    </div>
  </div>
</div>

JavaScript

$(".modal").on('shown.bs.modal', function() {
  $('.content-stuff p').tooltip();
})

$('[name="destroytooltip"]').on('click', function() {
	var toRemove = $('.content-stuff p');
  toRemove.detach();
	toRemove.tooltip('dispose');
  $('[name="destroytooltip"]').hide();
  
  $('#closebtn').show();
});