How to use React-Query with RAC Table? #4916
-
React Query has fast become the defacto standard for client side async operations for reasons too innumerable to list here. Although i appreciate react-aria has its own utility functions for passing async operations to its constituent components, i loose a tremendous amount of benefit and utility not being able to use react-query in this instance. Does anyone have any code sandboxes or solutions as to how i can pass an async list of items to the table? Would i need to extend the AsyncListData type with a React Query equivalent? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
No, the |
Beta Was this translation helpful? Give feedback.
No, the
useAsyncList
hook is totally optional. So you'd just pass the list of items to theTableBody
items
prop. You could look at the dynamic collections example in the docs. Rather than using a static array for the items you could pass the items that you get from react-query.