diff --git a/docs/DataProviderWriting.md b/docs/DataProviderWriting.md index 19fd1bb64c..5cc78329b1 100644 --- a/docs/DataProviderWriting.md +++ b/docs/DataProviderWriting.md @@ -503,12 +503,12 @@ import { useDataProvider, Loading, Error } from 'react-admin'; const UserProfile = ({ userId }) => { const dataProvider = useDataProvider(); - const { data, isLoading, error } = useQuery({ + const { data, isPending, error } = useQuery({ queryKey: ['users', 'getOne', { id: userId }], queryFn: ({ signal }) => dataProvider.getOne('users', { id: userId, signal }) }); - if (isLoading) return ; + if (isPending) return ; if (error) return ; if (!data) return null;