1
2<input className="newpost-rating-slider" type="range" name="rangeInput"
3min="0" max="5" onChange={handleSliderRating} />
4
5<span className="slider-rating-field">0/5</span>
6
7
8
9const handleSliderRating = () => {
10
11 var curVal = document.querySelector('.newpost-rating-slider').value;
12 var sliderRatingEle = document.querySelector('.slider-rating-field');
13
14 sliderRatingEle.textContent = curVal.toString() + "/5";
15
16 }