JSFiddle - React, Tailwind, and code Playground

HTML

<input type="checkbox" id="check" />
<input type="text" id="text" />

JavaScript

$('#text').on('keyup', function() {
    $('#check').prop('checked', !!this.value.length);
});