From 0172a7a9c015714187a8cd7dc129a68f6c6548c7 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kaiser Date: Tue, 28 Nov 2023 09:47:27 +0100 Subject: [PATCH] remove changes unrelated to #9466 from upgrade guide --- docs/Upgrade.md | 106 ------------------------------------------------ 1 file changed, 106 deletions(-) diff --git a/docs/Upgrade.md b/docs/Upgrade.md index 8eee7ccaa75..f8c532d9065 100644 --- a/docs/Upgrade.md +++ b/docs/Upgrade.md @@ -5,112 +5,6 @@ title: "Upgrading to v5" # Upgrading to v5 -React-admin v5 has upgraded all its dependencies to their latest major version. Some major dependencies were swapped (`@tanstack/react-query` instead of `react-query`). - -## `@tanstack/react-query` instead of `react-query` - -We upgraded `react-query` to version 5. If you used some features directly from this library, you'll have to follow their migration guide for [v4](https://tanstack.com/query/v5/docs/react/guides/migrating-to-react-query-4) and [v5](https://tanstack.com/query/v5/docs/react/guides/migrating-to-v5). Here's a list of the most important things: - - - The package has been renamed to `@tanstack/react-query` so you'll have to change your imports: - - ```diff - -import { useQuery } from 'react-query'; - +import { useQuery } from '@tanstack/react-query'; - ``` - -- `isLoading` has been renamed to `isPending`: - - ```diff - import * as React from 'react'; - import { useUpdate, useRecordContext, Button } from 'react-admin'; - - const ApproveButton = () => { - const record = useRecordContext(); - - const [approve, { isLoading }] = useUpdate('comments', { id: record.id, data: { isApproved: true }, previousData: record }); - + const [approve, { isPending }] = useUpdate('comments', { id: record.id, data: { isApproved: true }, previousData: record }); - - return