JSFiddle - React, Tailwind, and code Playground
by lucapolverini74
HTML
<script src="//code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<link rel="stylesheet" href="//stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
<script src="//stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://unpkg.com/regrafx@1.0.1-alpha.4/dist/iffe/regrafx.js"></script>
<html>
<body>
<div class="container">
<div class="alert alert-primary" role="alert">ReGraFX: Debounce input</div>
<div class="form-group">
<input id="b1" type="text" placeholder="Type something">
</div>
<div id="out" class="card card-body">---</div>
</div>
</body>
</html>
JavaScript
const out = document.getElementById('out');
let count = 0;
const v1 = new RGFX.Vertex(new RGFX.Task( y => { out.innerText = y;}), new RGFX.Debounce(500));
b1.addEventListener('input', evt => { v1.trigger(evt.target.value); });