JSFiddle - React, Tailwind, and code Playground

HTML

<input type="checkbox" class="checkbox1" value="test"/><br />
<input type="checkbox" class="checkbox1" value="test2"/> <br />
<input type="checkbox" class="checkbox1" value="test3"/>

JavaScript

$(document).ready(function() {
    //set initial state.

    $('.checkbox1').click(function() {
        if ($(this).is(':checked')) {
            console.log($('.checkbox1').val());
        }
    });
});