Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
-1 votes
1 answer
454 views

Whats the difference between React-Query and Redux? [closed]

Am already using redux in my application.My application is kinda big (a lot of code ) and mostly using class base components. Should i go for react-query for better api calls. I have read online about ...
Adnan Ashraf's user avatar
0 votes
0 answers
22 views

react inter component variable availability : redux and react query

My question is about variables availability accross elements in react when not using redux store. Im trying to get rid of complex redux because my use case doesnt need that much complexity and trying ...
kr1p's user avatar
  • 31
-3 votes
1 answer
245 views

How to migrate from redux to react-query? [closed]

I started studying react-query, I can't figure it out. Please help with an example based on my code There was such an action and a reducer export const addHighlighting = parent_id => dispatch => ...
Butonix's user avatar
0 votes
1 answer
684 views

React query isLoading and isFetching Issue when localStorage value is updating

I am creating a cart page for an ecommerce site. I am using redux for state management and react-query for data management. I am new in redux and react-query. I am facing some problem while updating ...
Robiul Hasan's user avatar
2 votes
0 answers
233 views

How to handle server side custom validation error in Axios interceptors and return to react query?

for example I am calling an api to register an user, I am already validating in client side before call the API, after calling api, server side will validate also, like (email already exists or phone ...
Liam neesan's user avatar
  • 2,501
0 votes
1 answer
488 views

Redux-Toolkit dispatch in useEffect hook results in an infinite loop

Problem I use useMuation from react-query to do post requests and get the user info from JSON and then try to store it to my redux store using useEffect according to the status given by react-query ...
hans's user avatar
  • 1
0 votes
1 answer
1k views

HTTP put and get(id) request ReactQuery

I change the redux in my project to ReactQuery,and i got some problem with put req in my code. this is my code const { dispatch } = store; const editClientDataAsync = async ( id,data ) => { ...
ABs's user avatar
  • 1
0 votes
1 answer
2k views

How to use transformResponse in RTK Query to change server response

Please I am new to RTK query, I made an API call that returns an array of arrays of objects, I want to use the transformResponse option to flatten the API response to just one array of objects. Here ...
neil's user avatar
  • 711
0 votes
1 answer
865 views

Best approach to handle loading state in react when using Redux toolkit and react query

I'm building a React application with react query and Redux toolkit and i'm wondering how Can i handle loading state ? What's the best approach ? Should i create ann appSlice which has loading in his ...
Rinat08's user avatar
  • 31
1 vote
1 answer
3k views

Does React Query replace Redux or other global state managers? [duplicate]

Can I build react project without redux, only using react-query?
tonwayer's user avatar
  • 482
0 votes
1 answer
1k views

How to replace redux like store with react-query cache efficiently?

I am fetching a list of movies using useQuery and previously i was using a redux to store these movies and i had a search functionality where when i search i look for the movies in the store. Now i am ...
H.b's user avatar
  • 389
2 votes
1 answer
2k views

How to get partial data from RTK query

I am started to use RTK query and I am not sure to use it properly when I need to get just one element of my cached data. I have an object like this cached: { id: "1", age: 18, name: &...
Jonathan Pujol's user avatar
2 votes
2 answers
2k views

React Query / RTK Query integration with Redux?

I'm running a comparison between RTK Query and React Query, trying to decide which one to use in my React/Redux app. One of the points for consideration is their integration with Redux. I did some ...
Gambit2007's user avatar
  • 3,748
75 votes
9 answers
68k views

What is the main difference between React Query and Redux?

currently I am using redux in different projects for state management. A few days back, I listened about react-query which is also used for state management and provides caching and async fetching. I ...
Sanan Ali's user avatar
  • 3,189
4 votes
1 answer
6k views

React-Query/SWR vs Global state (e.g Redux, Zustand) when updating a single post creator's details in an infinite list of posts

In my application, I have a paginated feed containing posts retrieved from the /feed endpoint. Each feed post has... postId postTitle postBody postCreator (object) Each postCreator object has... ...
Will Despard's user avatar