When creating a reference to an instance of RangeSlider to call methods (as suggested here), TypeScript gives the error "No overload matches this call."
How to reproduce:
// ref to set slider to minimum position in useEffect()
const slider = useRef(null);
useEffect(() => {
if (slider.current !== null && reset === true) {
slider.current.setLowValue(50);
}
}, [reset]);
<View>
<RangeSlider
ref={slider} // error: No overload matches this call
rangeEnabled={false}
max={70}
min={50}
step={1}
initialLowValue={height}
value={height}
onValueChanged={(sliderValue: number) => setHeightValues(sliderValue)}
/>
</View>
Problem:
When creating a reference to an instance of RangeSlider to call methods (as suggested here), TypeScript gives the error "
No overload matches this call.
"How to reproduce: