JSFiddle - React, Tailwind, and code Playground
HTML
<input id="q" />
<br /><br />
<input id="output"/>
JavaScript
$('input#q').keyup( function() {
if( this.value.length % 3 == 0 ){
//code to run below
$('#output').val(this.value);
}
else{
return;
}
//return;
});