The code in Debouncer.LowLevel basically attempts to be as comprehensive as possible, permitting the widest variety of strategies, inputs and outputs.
However, that makes some common cases more verbose to implement than they could be (see the module documentation for an example).
So, the plan is to write some combination of helper functions and additional modules which cater to common use cases. This would mean:
catering for certain common input and output types
catering for certain strategies (debouncing vs. throttling)
catering for certain ways of integrating into your own update function
As my guide, I'll look at how I've actually used this on internal projects. I'll also look at the other debouncing packages for Elm. The idea would be that anyone moving from one of those to this package should be able to integrate just as simply, using some module that builds on top of Debouncer.LowLevel to provide some sugar.
The code in
Debouncer.LowLevel
basically attempts to be as comprehensive as possible, permitting the widest variety of strategies, inputs and outputs.However, that makes some common cases more verbose to implement than they could be (see the module documentation for an example).
So, the plan is to write some combination of helper functions and additional modules which cater to common use cases. This would mean:
update
functionAs my guide, I'll look at how I've actually used this on internal projects. I'll also look at the other debouncing packages for Elm. The idea would be that anyone moving from one of those to this package should be able to integrate just as simply, using some module that builds on top of
Debouncer.LowLevel
to provide some sugar.