You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
How to call useGetUsers from a refresh button. I see it is different hook. How to call it ?
It seems different hook to create/update/delete user from the CRUD example.
https://www.material-react-table.com/docs/examples/editing-crud
//call CREATE hook
const { mutateAsync: createUser, isPending: isCreatingUser } =
useCreateUser();
//call READ hook
const {
data: fetchedUsers = [],
isError: isLoadingUsersError,
isFetching: isFetchingUsers,
isLoading: isLoadingUsers,
} = useGetUsers();
//call UPDATE hook
const { mutateAsync: updateUser, isPending: isUpdatingUser } =
useUpdateUser();
//call DELETE hook
const { mutateAsync: deleteUser, isPending: isDeletingUser } =
useDeleteUser();
Thanks
Regards
Justin
Beta Was this translation helpful? Give feedback.
All reactions