JSFiddle - React, Tailwind, and code Playground

HTML

<p>
  <label>some label</label>
  <input type="text" value=""/>
</p>

JavaScript

$('p').each(function() {
    $(this).children('input').val($(this).children('label').text());
});