JSFiddle - React, Tailwind, and code Playground

HTML

<input type="checkbox" id="copyAddress" name="copyAddress">

JavaScript

$("#copyAddress").change(function () {
  $(this).is(':checked') ? alert ("Checked") : alert ("Unchecked");
});