Debouncing a loader with defer #10152
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This feels to me like you're trying to do the debounce too deep. You fetch data on a navigation from So I don't think you want to debounce the load, I think you want to debounce the programatic navigation. That way if they focus the next item before the debounce settles it'll never navigate to the interim list item in the first place. And then you can allow clicks/and enter key presses to trigger non-debounced navigations (which should happen automatically if you use FWIW I also don't think you need defer here as all the information you're working with feels critical to me. |
Beta Was this translation helpful? Give feedback.
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…