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
The mutation hooks execute the query when you call a callback. They return an array with the following items: `[mutate, { data, isLoading, error }]`. Mutation hooks are:
41
+
42
+
*[`useCreate`](./useCreate.md)
43
+
*[`useUpdate`](./useUpdate.md)
44
+
*[`useUpdateMany`](./useUpdateMany.md)
45
+
*[`useDelete`](./useDelete.md)
46
+
*[`useDeleteMany`](./useDeleteMany.md)
47
+
33
48
Their signature is the same as the related dataProvider method, e.g.:
The mutation hooks execute the query when you call a callback. They return an array with the following items: `[mutate, { data, isLoading, error }]`. Mutation hooks are:
77
-
78
-
*[`useCreate`](./useCreate.md)
79
-
*[`useUpdate`](./useUpdate.md)
80
-
*[`useUpdateMany`](./useUpdateMany.md)
81
-
*[`useDelete`](./useDelete.md)
82
-
*[`useDeleteMany`](./useDeleteMany.md)
83
-
84
-
For instance, here is an example using `useUpdate()`:
All Data Provider methods accept a `meta` parameter. React-admin doesn't set this parameter by default in its queries, but it's a good way to pass special arguments or metadata to an API call.
Copy file name to clipboardexpand all lines: docs/Admin.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -200,7 +200,7 @@ const dataProvider = {
200
200
201
201
Check the [Writing a Data Provider](./DataProviderWriting.md) chapter for detailed instructions on how to write a data provider for your API.
202
202
203
-
The `dataProvider` is also the ideal place to add custom HTTP headers, handle file uploads, map resource names to API endpoints, pass credentials to the API, put business logic, reformat API errors, etc. Check [the Data Provider documentation](./DataProviderIntroduction.md) for more details.
203
+
The `dataProvider` is also the ideal place to add custom HTTP headers, handle file uploads, map resource names to API endpoints, pass credentials to the API, put business logic, reformat API errors, etc. Check [the Data Provider documentation](./DataProviders.md) for more details.
0 commit comments