JSFiddle - React, Tailwind, and code Playground

HTML

<p id="contentBI" >you should click here! </p>

JavaScript

function doAlert(){
      alert("hi!");
  }

function addevent (){  //code indentation
   theBI=document.getElementById("contentBI");
   theBI.addEventListener("click",doAlert);
}
window.addEventListener("load",addevent);