JSFiddle - React, Tailwind, and code Playground
HTML
<div>Test</div>
JavaScript
$(function () {
$('*:contains("Test")').html('<h1>Test</h1>');
});
<div>Test</div>
$(function () {
$('*:contains("Test")').html('<h1>Test</h1>');
});