if you're going to have nice functions for these, don't use local state - instead, pass the slider as an argument for this function (that way you could have multiple sliders with displayed ranges, etc)