JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/ui-lightness/jquery-ui.css">
<p>
  <label>some label</label>
  <input type="text" value=""/>
</p>

JavaScript

$('p > label + input').val(function() { return $(this).prev().text(); });