Closed bgentry closed 1 week ago
@brandur this may not be stuff you're very familiar with but it's probably worth at least starting to get more in touch with the UI code here. TanStack Query is pretty great!
I don't expect we'll need to do this on a lot of pages and the approach will evolve some as we add additional filtering options on this page. For now this should suffice.
K thanks. Yep definitely good to look at since to me, "TanStack Query" sounds like a character out of the Star Wars cantina. Just read the docs though, and interesting.
Use the approaches outlined on the paginated queries and placeholder data docs for Tanstack Query to ensure that the page doesn't flash disruptively when changing the pagination count, so long as the rest of the params are still unchanged (
state
).https://tanstack.com/query/latest/docs/framework/react/guides/paginated-queries#better-paginated-queries-with-placeholderdata https://tanstack.com/query/latest/docs/framework/react/guides/placeholder-query-data
Fixes #55.