JSFiddle - React, Tailwind, and code Playground

by gkucmierz

HTML

<input placeholder="Enter some text" name="name"/>
<p id="values"></p>

JavaScript

const input = document.querySelector('input');
const log = document.getElementById('values');

input.addEventListener('input', updateValue);

function updateValue(e) {
	console.log(e);
  log.textContent = e.target.value;
}