JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" name="test" value="foo" />
<button onclick="attr()">Show attribute value</button>
<button onclick="val()">Show form-control value</button>
JavaScript
function attr() {
alert(document.querySelector('[name="test"]').getAttribute('value'));
}
function val() {
alert(document.querySelector('[name="test"]').value);
}