Skip to main content
Filter by
Sorted by
Tagged with
Best practices
0 votes
3 replies
74 views

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 ...
1million_ naira's user avatar
-1 votes
1 answer
40 views

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 ...
David Abramov's user avatar
0 votes
1 answer
27 views

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 ...
DecPK's user avatar
  • 25.4k
0 votes
1 answer
68 views

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 ...
MaBed's user avatar
  • 425
1 vote
1 answer
85 views

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]$...
Ryan Taylor's user avatar
  • 8,922
0 votes
2 answers
127 views

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 ...
ADB's user avatar
  • 729
0 votes
1 answer
299 views

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 ...
user28194384's user avatar
0 votes
1 answer
129 views

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 ...
Vincent's user avatar
  • 669
3 votes
3 answers
2k views

I tried with: let searchText = $derived(debounce((typedText) => typedText, 2000)(typedText)); But searchText is not assigned! Reproduction with $derived: searchText is not assigned. Reproduction ...
Fred Hors's user avatar
  • 4,273
0 votes
1 answer
78 views

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); ...
Baxu's user avatar
  • 15
1 vote
1 answer
174 views

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 ...
jaheraho's user avatar
  • 570
2 votes
2 answers
184 views

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. ...
sudoExclamationExclamation's user avatar
0 votes
0 answers
143 views

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 ...
codercret company's user avatar
0 votes
1 answer
81 views

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, ...
Vansh's user avatar
  • 1
2 votes
2 answers
528 views

I have a search for multiple types, so the general search method has a generic type T, and multiple simple methods call it specifying the type as needed. I'd like to delay search method's start (...
f3dm76's user avatar
  • 814
0 votes
1 answer
426 views

Question forum on slim-select: https://github.com/brianvoe/slim-select/discussions/541 Hi, I'm using Ruby on Rails with Stimulus JS and have been using slim select for the past 6 months in my project. ...
mohsin_jamshaid's user avatar
0 votes
1 answer
141 views

While using the AutoSuggestBox in e.g. the WinUI 3 Gallery app, I noticed that there is some kind of debouncing on the input. So if one types fast, the results are not updated until one stops typing. ...
me.at.coding's user avatar
  • 18.5k
0 votes
1 answer
43 views

import React,{useState} from 'react'; const app = () =>{ const [inputValue,setInputValue] = useState(); const handleChange = (e)=>{ setInputValue(e.target.value); ...
Kartar Singh's user avatar
0 votes
0 answers
39 views

I'm using lodash debounce function. My problem is that I don't know how to properly use debounce within for of loop so it debounces every iteration separately, not all loop at once. Here is code of ...
Akio's user avatar
  • 1
0 votes
1 answer
573 views

I try to add debounce to handleInputChange in my React component. When user types in textarea, is shouldn't constantly rerender (I check it by console.log(commentBody), but maybe I'am wrong, I'm not ...
aftab's user avatar
  • 15
0 votes
1 answer
976 views

I tried to setup correct API call with debounce. Now I have function in ViewModel which call API search request with delay (debounce) and unique (latest) value, but as many as there are changes in the ...
Low Pre Intern's user avatar
0 votes
2 answers
184 views

I have a state value, it may change from time to time. I want to have a flag that indicate "this state has been staying in value x without any changes for y amount of time" How do I achieve ...
Mars's user avatar
  • 956
0 votes
3 answers
266 views

I am using useEffect and its working fine, but I am aked to use debounce insted. Should I just make the useEffect into a seprate/ reusable function? const [query, setQuery] = useState(''); ...
Saurabh Sahni's user avatar
0 votes
1 answer
131 views

I try to understand how i can debounce a "set" trap in javascript proxy. function debounce(func, wait, immediate = false) { let timeout = null; return function(...args) { let ...
Marc's user avatar
  • 4,049
1 vote
0 answers
320 views

I made a debounce function in Vanilla JS to understand how debouncing function works. <!-- index.html --> <div> <input id="text" type="text" /> </div> // ...
pop's user avatar
  • 139
1 vote
1 answer
384 views

I'm facing a challenge with debouncing multiple calls to a function in a React component, where each call represents an update to the number of copies for a specific file. To implement debouncing, I'm ...
Guilherme do Valle's user avatar
-2 votes
2 answers
349 views

Following is my code implementation for which debounce in JavaScript is not working. I am trying to execute the function only after 3 sec delay. Let me know what I am doing wrong here. Code - ...
Nesh's user avatar
  • 2,611
0 votes
1 answer
342 views

I'm currently working on an e-commerce application using React, and I'm having issues managing cart updates when users add or subtract the quantity of items in their cart. At the moment, I'm sending ...
Badrudin's user avatar
-1 votes
1 answer
184 views

I'm trying to search for a product from my database and using lodash's debounce to send request after a certain time. The problem I'm facing is that the request is going after the specified time only ...
Srivatsa's user avatar
  • 106
0 votes
2 answers
758 views

What is the recommended approach for dealing with a debounced input in Cypress E2E tests. For example, let's assume I have the following component that uses lodash/debounce import React, { useState, ...
George Eracleous's user avatar
2 votes
0 answers
300 views

I am trying to update lastMessage on a chatRoom, So every time a message is created in the subcollection of the chat room it sets it as lastMessage on the chatRoom. In order to avoid unnecessary ...
pikilon's user avatar
  • 167
1 vote
1 answer
405 views

I'm currently working on a React project that utilizes React Router with react-router-dom. In one of my components, I'm using the setSearchParams function from useSearchParams to manage and modify URL ...
Guilherme G Silva's user avatar
2 votes
1 answer
1k views

I am using Next in the frontend, convex in the backend to build a text editor. Till now, I have made it so that when there is any update in the editor, I am updating the updated content to the ...
Rayyan Alam's user avatar
1 vote
0 answers
171 views

So, in my code, i am loading the Select options and the options i am loading are based on the calculation of possibleSubnets for a netMask, for example /64 will have so many records in dropdown. With ...
Deepanshu Bhalotia's user avatar
9 votes
6 answers
42k views

I am trying to implement debounce in my search input in React. The below code is causing the delay but its firing the same number of times. Example - If I type abcd in less than 2 seconds(delay) my ...
Nesh's user avatar
  • 2,611
1 vote
1 answer
986 views

I have an input box where the user can manually enter the quantity and also plus(+) minus(-) signs so that they can add/remove by clicking on the plus or minus signs. What I am trying to achieve is ...
Rinael's user avatar
  • 157
0 votes
1 answer
245 views

I am trying to implement debounce in react js , and I have written the following code . import { useEffect, useRef, useState, useMemo } from "react"; function debounce(fn) { let timer = ...
Sarthak Gupta's user avatar
1 vote
0 answers
180 views

I have a component where debounce is added for the onChange of an input component. This input component only takes numbers as input. While entering decimal value there is a flicker in the component. ...
Apoorva Ojha's user avatar
1 vote
2 answers
693 views

Why is it bad practice to store a component as the state value? const [Component, setComponent] = useState<JSX.Element>(<Empty />); Say I want to conditionally render a component based ...
Matthew's user avatar
  • 667
2 votes
1 answer
3k views

How can i prevent the users to accidentally press twice on the button thus placing the same order twice, using debouncing with timer? I actually tried using debouncing on the button but I couldn't ...
NecSil's user avatar
  • 21
2 votes
1 answer
735 views

I made a composant that run a search to an API once the text changes with lodash's debounce. I made it works either by using useCallback and useMemo but I can't understand the differences (advantages/...
Brice's user avatar
  • 814
0 votes
1 answer
232 views

I'm using this javascript code for @tanstack/query IndexedDB persistance as documented here. I'm having too much put() calls and I would like to throttle/debounce them. How can I do this in the below ...
Fred Hors's user avatar
  • 4,273
2 votes
1 answer
896 views

I have the test below Which I am running on a reusable text field that has a debounce function as below (code slightly trimmed) For some reason I keep getting the error below despite using vitest....
myrdstom's user avatar
  • 326
0 votes
1 answer
1k views

I am trying to filter my search results using debounce lodash. I ma able to filter but the debounce is not working the way it is supposed to. Every time I enter text in the input an API call is made. ...
WebDeveloper1213's user avatar
1 vote
1 answer
1k views

the code below logs 'scrolled' to the console multiple times (at least 10 times), even though using monitorEvents() indicates a single keydown event. how can i ensure only a single 'scrolled' gets ...
engrgolden's user avatar
1 vote
1 answer
87 views

I practiced a debounce on bigfrontend, there is an example in the stem of the question, each dash represents the waiting time, the question is about the following The question is https://bigfrontend....
ChenLee's user avatar
  • 1,539
0 votes
0 answers
303 views

I am trying to make a system where when a person steps on a part, they get 1 win, but when 2 people jump on it at the same time, it doesn't give the next person a point. I tried a local player script ...
1hexuhh's user avatar
0 votes
1 answer
49 views

My Problem is that when I try to script what I listed in the Title, it always gives a win to only one player when they both jump at the same time. I just need help to fix this and only give 1 win to ...
1hexuhh's user avatar
3 votes
1 answer
676 views

I'm facing an issue with a JavaScript event where an AJAX request is sent multiple times when the event is triggered rapidly. Let's say I have an input field that triggers an AJAX request on the "...
Sk Miraj's user avatar
1 vote
1 answer
377 views

I'm using pinia store to fetch queries into firestore data base through this action ( async getdayAppointments(appointmentdate)) in the store but some times if the action is triggered two times in a ...
omar jasim's user avatar

1
2 3 4 5
15