modifying data fetched by React-Query on the client side
Hi all,
I'm new to react-query and I'm building a project and trying to learn along the way. I'm stuck in a requirement and would appreciate the help.
Here's an use case:
I'm fetching the user's list from its API through react-query (say, usersList) and displaying it in a list format.
I have a SortMenu component which has options like sort by name, sort by created date etc.
I need a way to sort the usersList.
What is the best way to do this?
Note: I'm using zustand for client state management.
Thanks in advance
I'm new to react-query and I'm building a project and trying to learn along the way. I'm stuck in a requirement and would appreciate the help.
Here's an use case:
I'm fetching the user's list from its API through react-query (say, usersList) and displaying it in a list format.
I have a SortMenu component which has options like sort by name, sort by created date etc.
I need a way to sort the usersList.
What is the best way to do this?
Note: I'm using zustand for client state management.
Thanks in advance