Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#8793 Fix broken links on mutation pages #8794

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -36,4 +36,4 @@ const mutation = useMutation({

[//]: # 'Example2'

You can wire up your invalidations to happen using any of the callbacks available in the [`useMutation` hook](../mutations)
You can wire up your invalidations to happen using any of the callbacks available in the [`useMutation` hook](./mutations)
8 changes: 4 additions & 4 deletions docs/framework/react/guides/mutations.md
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ Beyond those primary states, more information is available depending on the stat

In the example above, you also saw that you can pass variables to your mutations function by calling the `mutate` function with a **single variable or object**.

Even with just variables, mutations aren't all that special, but when used with the `onSuccess` option, the [Query Client's `invalidateQueries` method](../../../../reference/QueryClient/#queryclientinvalidatequeries) and the [Query Client's `setQueryData` method](../../../../reference/QueryClient/#queryclientsetquerydata), mutations become a very powerful tool.
Even with just variables, mutations aren't all that special, but when used with the `onSuccess` option, the [Query Client's `invalidateQueries` method](../../../reference/QueryClient#queryclientinvalidatequeries) and the [Query Client's `setQueryData` method](../../../reference/QueryClient#queryclientsetquerydata), mutations become a very powerful tool.

[//]: # 'Info1'

@@ -136,7 +136,7 @@ const CreateTodo = () => {

## Mutation Side Effects

`useMutation` comes with some helper options that allow quick and easy side-effects at any stage during the mutation lifecycle. These come in handy for both [invalidating and refetching queries after mutations](../invalidations-from-mutations) and even [optimistic updates](../optimistic-updates)
`useMutation` comes with some helper options that allow quick and easy side-effects at any stage during the mutation lifecycle. These come in handy for both [invalidating and refetching queries after mutations](./invalidations-from-mutations) and even [optimistic updates](./optimistic-updates)

[//]: # 'Example4'

@@ -343,7 +343,7 @@ queryClient.resumePausedMutations()

### Persisting Offline mutations

If you persist offline mutations with the [persistQueryClient plugin](../../../react/plugins/persistQueryClient), mutations cannot be resumed when the page is reloaded unless you provide a default mutation function.
If you persist offline mutations with the [persistQueryClient plugin](../plugins/persistQueryClient), mutations cannot be resumed when the page is reloaded unless you provide a default mutation function.

This is a technical limitation. When persisting to an external storage, only the state of mutations is persisted, as functions cannot be serialized. After hydration, the component that triggers the mutation might not be mounted, so calling `resumePausedMutations` might yield an error: `No mutationFn found`.

@@ -386,7 +386,7 @@ export default function App() {

[//]: # 'Example11'

We also have an extensive [offline example](../../examples/offline) that covers both queries and mutations.
We also have an extensive [offline example](../../../../examples/react/offline) that covers both queries and mutations.

## Mutation Scopes