JSFiddle - React, Tailwind, and code Playground
HTML
<input type='text' value='' id='name' name='name'>
JavaScript
function onloadFocus(){
var name = document.getElementById('name');
setTimeout(function() {
document.getElementById('name').focus()
}, 10);
}
window.onload=onloadFocus();