JSFiddle - React, Tailwind, and code Playground
HTML
<label for='hi'></label>
JavaScript
$(document).ready(function() {
this.id = 'hi'
$("label[for='" + this.id + "']").text("the new text");
})
<label for='hi'></label>
$(document).ready(function() {
this.id = 'hi'
$("label[for='" + this.id + "']").text("the new text");
})