Skip to content

Elm component for debouncing a series of changing values

License

Notifications You must be signed in to change notification settings

fredcy/elm-debouncer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elm-debouncer

This module provides a component following The Elm Architecture that can "debounce" a series of updates to a value.

See example/Main.elm for an example of using this module:

cd example
elm reactor

Then visit http://localhost:8000/src/Main.elm and experiment with the input field.

Related work

https://github.com/pdamoc/elm-assistance provides a similar component. It subscribes to AnimationFrame.diffs until the value settles and checks the timestamp of each resulting tick to determine when the settling interval has elapsed.

athanclark/elm-debouncer provides a generalized debouncer. It also uses Process.sleep for timing.

About

Elm component for debouncing a series of changing values

Resources

License

Stars

Watchers

Forks

Packages

No packages published