JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<h1 id="var1">
0
</h1>
<h1 id="var2">
0
</h1>
</body>
JavaScript
jQuery(document).ready(function() {
var readOut1;
var readOut2;
$(document).mousemove(function(e) {
readOut1 = e.pageX;
readOut2 = e.pageY;
$('#var1').html(readOut1);
$('#var2').html(readOut2);
});
})