JSFiddle - React, Tailwind, and code Playground

by Yuriy Petrichenko

HTML

<html>
  <head>
    <script src="https://unpkg.com/rxjs/bundles/rxjs.umd.min.js"></script>
  </head>
  <body>
    <input type="text" id="first">
     <input type="text" id="second">
     
     <h1></h1>
  </body>
</html>

JavaScript

const RxJs = rxjs;
const txt = document.querySelector("h1").innerText;


const inp1 = RxJs.fromEvent(first, "input");
const inp2 = RxJs.fromEvent(second, "input");

inp1.mergeMap(data => {
		return data;
})
.subscribe(res => console.log(res));