JSFiddle - React, Tailwind, and code Playground
HTML
<p>a <span>b</span> c</p>
JavaScript
$(document).on('click', 'span', function() {
$(this)
.prev().append($(this).next().html()).end()
.next().remove().end()
.remove()
;
});