JSFiddle - React, Tailwind, and code Playground

HTML

<form action="demo_form.asp" autocomplete="on">
  First name:<input type="text" name="fname" /><br>
  Last name: <input type="text" name="lname" /><br>
 <br>
  <input type="submit" />
</form>

JavaScript

document.getElementsByName("fname")[0].autocomplete="off"