Skip to content

Debouncing a loader with defer #10152

Closed Answered by brophdawg11
Rafal-Jenczelewski asked this question in Q&A
Discussion options

You must be logged in to vote

when user selects a row from that list, a panel opens up on the right to show details of that item

With this implementation we make way too many requests - user may be just scrolling to the bottom of the list using keyboard and we will load each and every item on the page, so we need to start fetching only when user stopped scrolling

This feels to me like you're trying to do the debounce too deep. You fetch data on a navigation from /items/1 -> /items/2. But it sounds like you are allowing scrolling down via the keyboard to trigger a navigation, which I don't think sounds right. You only want to navigate when the user chooses an item in the list. With a mouse this would be a click, wi…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Rafal-Jenczelewski
Comment options

Answer selected by Rafal-Jenczelewski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants