JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" class="" title="" placeholder="" id='idos'>

JavaScript

document.addEventListener('DOMContentLoaded', function() {
  const listener = function() {
    console.log(this.value || '');
  };

  const node = document.getElementBuId('idos');
  if (!node)
    throw new Error('Element not found');

  ['change', 'input'].forEach(function(event) {
    node.addEventListener(event, listener);
  });
});