fix behaviour

context-store
Alfred Melch 5 years ago
parent 74c0ed1de0
commit 38b1082772

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

Loading…
Cancel
Save