Check out example codes for "html input autofocus". It will help you in understanding the concepts better.

Code Example 1

<form action="/action_page.php">
  <label for="fname">First name:</label>
  <input type="text" id="fname" name="fname" autofocus><br><br>
  <label for="lname">Last name:</label>
  <input type="text" id="lname" name="lname"><br><br>
  <input type="submit">
</form>

Code Example 2

<form action="/action_page.php">

   <label for="fname">First name:</label>
  <input type="text" id="fname" 
    name="fname" autofocus><br><br>
  <label for="lname">Last 
    name:</label>
  <input type="text" id="lname" name="lname"><br><br>
  
    <input type="submit">
</form>

Learn ReactJs, React Native from akashmittal.com