TanStackT
TanStackโ€ข3y agoโ€ข
7 replies
progressive-amaranth

react query vs redux toolkit query

Hello,

I would like to have your advices about my application.

It is a global application with 4 independants apps. It looks like if you Want a monorepo.

For 2 of them which are built from scratch, I decided to use react query. Some fetching data and mutations for both.
At the end, react query was a good choice. Thank you for this amazing tool by the way.

For the last two applications, they have already redux + redux observable.

I wanted to remove all the observable boilerplate and I took a lot of Times for choosing between react query and redux toolkit.

I finally decided to use rtk query because the existing apps already used redux.

I thought about removing redux but the question wasn't easy AT all.

So i decided to have in the same repo react query for two apps and rtk query for the rest.

I know that there are pro and cons. I read a lot or articles and It IS apparently ok to combine react query and rtk query.

What are your thoughts about that ? Did I make a mistake by choosing rtk query over react query ?

Note that yes, the first Idea was to remove redux observable. That's why rtk query came to my mind because it is very similar to react query.

Thank you very much for your help ! Cc @Tanner Linsley ๐Ÿ˜‰ @TkDodo ๐Ÿ”ฎ
Was this page helpful?