715 questions
Tooling
0
votes
0
replies
105
views
How to watch files in Go with debouncing and glob pattern support?
When using fsnotify directly in Go, saving a single file triggers 4 to 5 raw events per save. For example saving a file in VSCode produces WRITE, CHMOD, WRITE, RENAME and CREATE events all from one ...
Best practices
0
votes
2
replies
115
views
Using setTimeout within useEffect() to debounce searching in react native pagination
I am planning to implement pagination into my project for my data from Supabase, I had the idea that since there are different parameters (such as search text, page number, filter) that I should use ...
Score of -1
1 answer
47 views
Make debouncing function on events
I have a parent component with two event functions handleMouseEnter and handleMouseLeave. The child component receives these two functions via props, so my goal is to make some delay in the execution ...
Score of 0
1 answer
30 views
How to setvalue of a textarea instant and call api after 2 second for efficiency
I've a textarea and I'd like to udpate text area text instantly as user enter text but I don't like to hit api after every keystroke for obvious reason for efficiency.
I've tried to use debounce ...
Score of 0
1 answer
79 views
Key-based debounce in Kotlin Flows
I have a flow of key-value pairs (e.g. Flow<Pair<String, Int>>) which I would like to debounce/throttle based on the key, so that when some sequence of pairs with non-unique keys comes I ...
Score of 1
1 answer
118 views
Debounce Function in PowerShell
I'm attempting to create a simple debounce function in PowerShell. Here is what I have so far.
# timer.ps1
# Define debounce function
Function New-Debounce {
param(
[scriptblock]$...
Score of 0
2 answers
171 views
How to test debouncing logic
I'm trying to use TDD to build a search view model that debounces before searching. Until recently I would have created a mock debouncer, injected it into my view model and used that to control the ...
Score of 0
1 answer
384 views
Promise somhow escapes to event loop?
I need a self-contained abstraction for debouncing a function call. While deno/async provides such a function, AFAICT there is no way to cancel an already running function (for example, to kill a ...
Score of 0
1 answer
147 views
Swift Debounce or delay with discriminator
My application includes various widgets indicating realtime values (temperature, cpu usage, memory, etc....).
These widgets are updated from JSON messages received through a single websocket.
At the ...
Score of 3
3 answers
2654 views
Is there a way to debounce a Svelte 5 $derived value?
I tried with:
let searchText = $derived(debounce((typedText) => typedText, 2000)(typedText));
But searchText is not assigned!
Reproduction with $derived: searchText is not assigned.
Reproduction ...
Score of 0
1 answer
104 views
Working of useSearchDebounce custom react hook
I found this code from this answer https://stackoverflow.com/a/68780417/26420821
How does it work?
export function useSearchDebounce(delay = 350) {
const [search, setSearch] = useState(null);
...
Score of 1
1 answer
198 views
RxJS alternative to debounceTime operator, so items won't get collected?
RxJS pros out there, I need your help!
Based on my last question I'm now looking for something different:
Question: How to separate values of a stream, keep the last of each and force flush after a ...
Score of 2
2 answers
969 views
In Swift, how to send network requests upon tap such that each request has a few seconds delay in between?
I have created this simple example to show the issue.
I have 4 buttons for upvoting, favouriting, flagging, and hiding. User can tap any button whenever they like and as many times as they want. ...
Score of 0
0 answers
173 views
How to Optimize Search Query Handling with React Query v5 Library?
I'm currently working on implementing a search functionality using the React Query library in my application. While I have a basic implementation in place, I'm seeking advice on how to optimize the ...
Score of 0
1 answer
85 views
React + FabricJS: Custom Scrollbar - Flickering Scroll Thumbs on zoom in/out state update
I made a Custom Scrollbar for FabricJS (Since they don't provide one). Everything seems to be working fine. The thumbs of the scrollbar do change their height and width when the zoom state updates, ...