Issue:
const exampleNumberType: number = 0;
<input type="range" onChange={
(event: React.ChangeEvent<HTMLInputElement>) => exampleNumberType = event.target.value
}/>
In typescript, the above code will throw an error because the type of event.target.value is 'string', but since it is input from a range event, it should be of type number (since range elements are used for selecting numbers, not strings).
Obviously you could use parseInt() or something similar to convert the value and make it conform to the type that you will need, but there is a more elegant solution (see answer below)...