Replies: 1 comment
-
If you're going to use react-query, read the react query docs. My examples already have what you're asking for if you look closely though. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
WRT CRUD example
https://www.material-react-table.com/docs/examples/editing-crud
How do you call/force to fetch data again using useQueryClient within the framework of material-react-table and useQueryClient in tansstack ?
It seems data can only be initialised once ? But i need to have a refresh button to force fetch again.
const {
data: fetchedUsers = [],
isError: isLoadingUsersError,
isFetching: isFetchingUsers,
isLoading: isLoadingUsers,
} = useGetUsers();
How do you force to refetch users with a refresh button ?
I like to call 'useGetUsers from within the Table...like a button. in renderTopToolbarCustomActions.
An error occurs as React Hook "useGetDyndata" cannot be called inside a callback. React Hooks must be called in a React function component or a custom React Hook function. Even if useGetUsers it is not going to update the data 'fetchedUsers'
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions