diff --git a/docs/Upgrade.md b/docs/Upgrade.md index 7bf50a09db2..34eac7381b4 100644 --- a/docs/Upgrade.md +++ b/docs/Upgrade.md @@ -3274,7 +3274,7 @@ Use the `` component instead. ### Removed Deprecated Elements - Removed `<BulkDeleteAction>` (use `<BulkDeleteButton>` instead) -- Removed `<ReferenceFieldController>` (use `useReferenceFieldController` instead) +- Removed `<ReferenceFieldController>` (use [`useReference`](./useGetOne.md#aggregating-getone-calls) instead) - Removed `<ReferenceArrayFieldController>` (use `useReferenceArrayFieldController` instead) - Removed `<ReferenceManyFieldController>` (use `useReferenceManyFieldController` instead) - Removed `<ReferenceInputController>` (use `useReferenceInputController` instead) diff --git a/docs/useGetOne.md b/docs/useGetOne.md index 9be0d40e721..45bba2e8886 100644 --- a/docs/useGetOne.md +++ b/docs/useGetOne.md @@ -90,7 +90,7 @@ const UserProfile = () => { This results in less calls to the dataProvider. For instance, if the `<UserProfile>` component above is rendered in a `<Datagrid>`, it will only make one call to `dataProvider.getMany()` for the entire list instead of one call to `dataProvider.getOne()` per row. -As this hook is often used to fetch references, react-admin exposes a `useReference` hook, which avoids doing the array conversion manually. It's an application hook rather than a data provider hook, so its syntax is a bit different. Prefer `useReference` to `useGetManyAggregate` when you use `useGetOne` to fetch a reference. +As `useGetManyAggregate` is often used to fetch references, react-admin exposes a `useReference` hook, which avoids doing the array conversion manually. It's an application hook rather than a data provider hook, so its syntax is a bit different. Prefer `useReference` to `useGetManyAggregate` when you use `useGetOne` to fetch a reference. ```diff -import { useGetOne, useRecordContext } from 'react-admin';