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
Hi,
Just wondering why is the functions - useGetUsers,useUpdateUser and useDeleteUser are outside the component of 'Example'.
They do not have access to the Example components states...if you wanted to add additional flags to send back to the backend server..etc. Is there a reason why it is not within the 'Example' Component ?
So in real examples CRUD - data is fetched but also other data which is not table related...could be additional information not in table.
Having the useGetUsers function outside the component. makes it hard to access other valuable information.
I am guessing react-material-table is highly coupled with @tanstack/react-query.
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,
Just wondering why is the functions - useGetUsers,useUpdateUser and useDeleteUser are outside the component of 'Example'.
They do not have access to the Example components states...if you wanted to add additional flags to send back to the backend server..etc. Is there a reason why it is not within the 'Example' Component ?
V2:
https://www.material-react-table.com/docs/examples/editing-crud
So in real examples CRUD - data is fetched but also other data which is not table related...could be additional information not in table.
Having the useGetUsers function outside the component. makes it hard to access other valuable information.
I am guessing react-material-table is highly coupled with @tanstack/react-query.
#CRUD example
Beta Was this translation helpful? Give feedback.
All reactions