fix behaviour

This commit is contained in:
Alfred Melch 2019-12-14 20:02:56 +01:00
parent 74c0ed1de0
commit 38b1082772

View File

@ -1,4 +1,4 @@
import React, { useCallback } from 'react'
import React from 'react'
import { useSelector, useDispatch } from 'react-redux'
import { debounce } from 'debounce'
@ -12,15 +12,13 @@ export const Options = () => {
return (
<div>
<h2>Options</h2>
<Slider
title={'Maximum segment length'}
min={3}
max={15}
value={maxLength}
onChange={useCallback(
debounce(val => dispatch(setMaxLength(val)), 100, true),
[dispatch]
)}
onChange={debounce(val => dispatch(setMaxLength(val)), 100)}
/>
<Slider
title={'Words per minute'}