#prevent scroll sticks to bottom in infinite scroll

1 messages · Page 1 of 1 (latest)

inland glacier
graceful hemlock
#

Debounce your fetch? Are you using fetcher.submit/load to get new data?

inland glacier
#

yes, im using fetcher.load to get data. how do i debounce?

inland glacier
#

do I just setTimeout it?

inland glacier
#

?

graceful hemlock
#

@inland glacier Hey sorrry, you can use lodash _.debounce or you can use chatGPT to write you a more specific debounce function if you've never written one. There's also a ton of docs online on how to debounce in react

#

setTimeout won't wait for the function to execute, it will just stream everything X seconds from now, unless you cancel the timeout for a new one

inland glacier
inland glacier
#

?