Skip to main content

[ ![Redux Logo](/img/redux.svg) ![Redux Logo](/img/redux.svg) **Redux
Toolkit** ](/)

[ Getting Started ](/introduction/getting-started) [ Tutorials
](/tutorials/overview) [ Usage Guide ](/usage/usage-guide) [ API
](/api/configureStore) [ RTK Query ](/rtk-query/overview) [ GitHub
](https://github.com/reduxjs/redux-toolkit)

Search

  * [ Introduction ](/introduction/getting-started)

    * [ Getting Started ](/introduction/getting-started)
    * [ Why Redux Toolkit is How To Use Redux Today ](/introduction/why-rtk-is-redux-today)
  * [ Tutorials ](/tutorials/overview)

    * [ Tutorials Overview ](/tutorials/overview)
    * [ Quick Start ](/tutorials/quick-start)
    * [ TypeScript Quick Start ](/tutorials/typescript)
    * [ RTK Query Quick Start ](/tutorials/rtk-query)
  * [ Using Redux Toolkit ](/usage/migrating-to-modern-redux)

    * [ Migrations ](/usage/migrating-to-modern-redux)

    * [ Usage Guide ](/usage/usage-guide)
    * [ Usage With TypeScript ](/usage/usage-with-typescript)
    * [ Writing Reducers with Immer ](/usage/immer-reducers)
    * [ Setup with Next.js ](/usage/nextjs)
  * [ API Reference ](/api/configureStore)

  * [ RTK Query ](/rtk-query/overview)

    * [ RTK Query Overview ](/rtk-query/overview)
    * [ Comparison with Other Tools ](/rtk-query/comparison)
    * [ Examples ](/rtk-query/usage/examples)
    * [ Usage With TypeScript ](/rtk-query/usage-with-typescript)
    * [ Using RTK Query ](/rtk-query/usage/queries)

    * [ API Reference ](/rtk-query/api/createApi)

  * [ ](/)
  * RTK Query 
  * Comparison with Other Tools 

On this page

#  Comparison with Other Tools

**RTK Query takes inspiration from many other data fetching libraries in the
ecosystem** . Much like [ the Redux core library was inspired by tools like
Flux and Elm ](https://redux.js.org/understanding/history-and-design/prior-
art) , RTK Query builds on API design patterns and feature concepts
popularized by libraries like [ React Query ](https://react-
query.tanstack.com/) , [ SWR ](https://swr.vercel.app/) , [ Apollo
](https://www.apollographql.com/) , and [ Urql ](https://formidable.com/open-
source/urql/) . RTK Query has been written from scratch, but tries to use the
best concepts from those libraries and other data fetching tools, with an eye
towards leveraging the unique strengths and capabilities of Redux.

We think that all of those tools are great! If you're using one of them,
you're happy with it, and it solves the problems you are facing in your app,
keep using that tool. The information on this page is meant to help show
**where there are differences in features, implementation approaches, and API
design** . The goal is to help you **make informed decisions and understand
tradeoffs** , rather than argue that tool X is better than tool Y.

##  When Should You Use RTK Query?  ​

In general, the main reasons to use RTK Query are:

  * You already have a Redux app and you want to simplify your existing data fetching logic 
  * You want to be able to use the Redux DevTools to see the history of changes to your state over time 
  * You want to be able to integrate the RTK Query behavior with the rest of the Redux ecosystem 
  * Your app logic needs to work outside of React 

###  Unique Capabilities  ​

RTK Query has some unique API design aspects and capabilities that are worth
considering.

  * With React Query and SWR, you usually define your hooks yourself, and you can do that all over the place and on the fly. With RTK Query, you do so in one central place by defining an "API slice" with multiple endpoints ahead of time. This allows for a more tightly integrated model of mutations automatically invalidating/refetching queries on trigger. 
  * Because RTK Query dispatches normal Redux actions as requests are processed, all actions are visible in the Redux DevTools. Additionally, every request is automatically visible to your Redux reducers and can easily update the global application state if nece