JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" size="50" />

JavaScript

$('input').val(window.location.href);