JSFiddle - React, Tailwind, and code Playground

HTML

<button id="buttonOne" onclick="pressOne()">Press</button>

JavaScript

$("button").attr("onclick","pressTwo()");