JSFiddle - React, Tailwind, and code Playground
HTML
<input type="range" id="a" value="20">
<input type="number" id="b" value="20">
JavaScript
a.oninput=()=>b.value=a.value
b.oninput=()=>a.value=b.value
<input type="range" id="a" value="20">
<input type="number" id="b" value="20">
a.oninput=()=>b.value=a.value
b.oninput=()=>a.value=b.value