From 322760bf4348ebf653c34fe87f2e9c8b28f2efe2 Mon Sep 17 00:00:00 2001 From: Favour Ohanekwu Date: Thu, 23 Jan 2025 17:50:04 +0100 Subject: [PATCH] docs(framework): update Next.js and Svelte documentation links (#8572) * docs(svelte): fix writable stores tutorial link Update the Svelte stores tutorial link to the correct URL in the Svelte Query overview documentation. The previous link to writable-stores was broken or outdated. * docs(ssr): update Next.js documentation links to latest version Update outdated Next.js documentation links in the SSR guide to point to the latest App Router documentation paths, ensuring users are directed to the most current and relevant documentation. Links updated: - rewrites feature - automatic static optimization - rewrite parameters --- docs/framework/react/guides/ssr.md | 2 +- docs/framework/svelte/overview.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/framework/react/guides/ssr.md b/docs/framework/react/guides/ssr.md index 55910fc84b..6c522c5916 100644 --- a/docs/framework/react/guides/ssr.md +++ b/docs/framework/react/guides/ssr.md @@ -554,6 +554,6 @@ Alternatively, you can set a smaller `gcTime`. ### Caveat for Next.js rewrites -There's a catch if you're using [Next.js' rewrites feature](https://nextjs.org/docs/api-reference/next.config.js/rewrites) together with [Automatic Static Optimization](https://nextjs.org/docs/advanced-features/automatic-static-optimization) or `getStaticProps`: It will cause a second hydration by React Query. That's because [Next.js needs to ensure that they parse the rewrites](https://nextjs.org/docs/api-reference/next.config.js/rewrites#rewrite-parameters) on the client and collect any params after hydration so that they can be provided in `router.query`. +There's a catch if you're using [Next.js' rewrites feature](https://nextjs.org/docs/app/api-reference/next-config-js/rewrites) together with [Automatic Static Optimization](https://nextjs.org/docs/pages/building-your-application/rendering/automatic-static-optimization) or `getStaticProps`: It will cause a second hydration by React Query. That's because [Next.js needs to ensure that they parse the rewrites](https://nextjs.org/docs/app/api-reference/next-config-js/rewrites#rewrite-parameters) on the client and collect any params after hydration so that they can be provided in `router.query`. The result is missing referential equality for all the hydration data, which for example triggers wherever your data is used as props of components or in the dependency array of `useEffect`s/`useMemo`s. diff --git a/docs/framework/svelte/overview.md b/docs/framework/svelte/overview.md index d86765aca1..f1122355aa 100644 --- a/docs/framework/svelte/overview.md +++ b/docs/framework/svelte/overview.md @@ -70,5 +70,5 @@ Svelte Query offers useful functions and components that will make managing serv Svelte Query offers an API similar to React Query, but there are some key differences to be mindful of. -- Many of the functions in Svelte Query return a Svelte store. To access values on these stores reactively, you need to prefix the store with a `$`. You can learn more about Svelte stores [here](https://svelte.dev/tutorial/writable-stores). +- Many of the functions in Svelte Query return a Svelte store. To access values on these stores reactively, you need to prefix the store with a `$`. You can learn more about Svelte stores [here](https://learn.svelte.dev/tutorial/writable-stores). - If your query or mutation depends on variables, you must use a store for the options. You can read more about this [here](../reactivity).