Skip to content

Commit

Permalink
docs: Update migrating-to-v5.md (#7539)
Browse files Browse the repository at this point in the history
* docs: Update migrating-to-v5.md

* docs: Update migrating-to-v5.md

* docs: Update migrating-to-v5.md
  • Loading branch information
Joshrogan committed Jun 9, 2024
1 parent bf500ae commit 40fcb54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/framework/react/guides/migrating-to-v5.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ React Query v5 requires React 18.0 or later. This is because we are using the ne

You could previously use the `contextSharing` property to share the first (and at least one) instance of the query client context across the window. This ensured that if TanStack Query was used across different bundles or microfrontends then they will all use the same instance of the context, regardless of module scoping.

However, isolation is often preferred for microfrontends. In v4 the option to pass a custom context to the `QueryClientProvider` was added, which allows exactly this. If you wish to use the same query client across multiple packages of an application, you can create a `QueryClient` in your application and then let the bundles share this through the `context` property of the `QueryClientProvider`.
With the removal of the custom context prop in v5, refer to the section on [Removed custom context prop in favor of custom queryClient instance](#removed-custom-context-prop-in-favor-of-custom-queryclient-instance). If you wish to share the same query client across multiple packages of an application, you can directly pass a shared custom `queryClient` instance.

### No longer using `unstable_batchedUpdates` as the batching function in React and React Native

Expand Down

0 comments on commit 40fcb54

Please sign in to comment.