JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" name="sameAsShipping" class="checkbox" id="checkbox4">
<div id="checkout-shipping-address">
</div>
CSS
.show-hide
{
display:none;
margin: 0;
padding: 0;
clear:both;
}
JavaScript
$(function(){
$("#checkbox4").change(function() {
$("#checkout-shipping-address").children("p").remove();
$("#checkout-shipping-address").append("<p>content</p>").toggleClass("show-hide");
}).change();
})