---
title: "Discussion on \"React Query: Execution order of useMutation side effects\" | Hashnode"
description: "Discussion on \"React Query: Execution order of useMutation side effects\". Today I learned, what is the actual order of execution of React Query useMutation side effects.\nGiven a mutation like this:\n  const mutation = useMutation(\n    (id) => {\n      console.log('Mutation callback')\n      return toggleTodo(id)\n    },\n    {\n..."
url: "https://hashnode.com/posts/react-query-execution-order-of-usemutation-side-effects/634f8cd2db9790ec7e3f6e45"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [React Query: Execution order of useMutation side effects](https://blog.macieksitkowski.com/react-query-execution-order-of-usemutation-side-effects?utm_source=hashnode&utm_medium=feed)

Today I learned, what is the actual order of execution of React Query useMutation side effects. Given a mutation like this: const mutation = useMutation( (id) => { console.log('Mutation callback') return toggleTodo(id) }, { ...

Oct 19, 2022 · 1 min read · blog.macieksitkowski.com  
Updated Oct 21, 2022  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#react-query](https://hashnode.com/tag/react-query)

## Written by

[Maciek Sitkowski](https://hashnode.com/@sitek94)

@sitek94 · Poland

  
[View profile](https://hashnode.com/@sitek94)

mostly frontend

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
