Chad Steele
I want to debounce a signal for some effects, but not others
In short, I'm using a slider to allow the user to quickly adjust font scale linearly. I need the font to respond to the 1000s of adjustments, but I do not want to update the history buffer with every minor font change that the slider will trigger.
I tried to get the primitives to work, but failed to find a way to have both instant and bounced effects without having to write a lot of code.
https://primitives.solidjs.community/package/scheduled#debounce
My solution is pretty basic, but works well. I'm curious if there's a better way.
In this way, you can use the signal normally or the debounced value. For example,
14 replies