JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" id="chkHabilita" /> Fin de Semana </br>
<input type="text" id="txtPrueba" />
JavaScript
$('#chkHabilita').click(function () {
var $this = $(this);
// $this will contain a reference to the checkbox
if ($this.is(':checked')) {
$("#txtPrueba").val('hola');
} else {
$("#txtPrueba").val('chao');
}
});