title: React redux slider
body: <p>I have a page presenting sales offers, I would like to add to my list a filter on the year with a slider whose minimum corresponds to the smallest year of my offers and the maximum with the largest year my offers</p>
  <p>My problem is that on my slider I have the value &quot;Nan&quot; which appears on the minimum ... I specify that I am starting with react-redux</p>
  <pre><code>const [year, setYear] = useState([filters.year.year__min,filters.year.year__max])
  </code></pre>
  <p>code</p>
  <pre><code>const handleChange = (event, newValue) =&gt; {
      setYear(newValue);
    };
  </code></pre>
  <p>code</p>
  <pre><code>function valuetext(value) {
      return `${year}`;
  }
  </code></pre>
  <p>code</p>
  <pre><code>&lt;Slider
  defaultValue={year}
  onChange={handleChange}
  valueLabelDisplay=&quot;auto&quot;
  aria-labelledby=&quot;range-slider&quot;
  getAriaValueText={valuetext}
  min={filters.year.year__min}
  max={filters.year.year__max} 
  </code></pre>
  <blockquote>
  </blockquote>
  <p>thanks for your help :)</p>