JSFiddle - React, Tailwind, and code Playground

by Ed Bulikyan

HTML

<input name="test" />
<span id="result"></span>

JavaScript

var input = document.querySelector('input[name="test"]');
var result = document.querySelector('#result');

input.addEventListener('input', (e) => {
	result.innerText = e.target.value;
});