JSFiddle - React, Tailwind, and code Playground

HTML

<input id="hi" type="text" value="hello" />

JavaScript

document.getElementById("hi").value = "what";