T
T
Tatyana Dzhanaeva2021-11-12 17:47:40
redux
Tatyana Dzhanaeva, 2021-11-12 17:47:40

Is it possible to use Redux Saga and Apollo client together?

I train on the application, stack - Next.js, redux toolkit, apollo client. I want to put all the query logic into the saga (as usual) and in the component pull data from the redax store and only display it. but if there are no problems with axios or fetch, then useQuery and UseMutation should be used only in the body of the component, but not in the saga.
Is it possible to somehow combine these 2 technologies, or send requests in the component, and dispatch the responses to the store? but then, it turns out, the saga is not needed. Please help a newbie understand

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tatyana Dzhanaeva, 2021-11-12
@DjanTanKa

Well,
first of all, this is an editorial devtools, it is very convenient to track actions and immediately see my entire story. Then again, it's good when everything is in one place. But Apollo can’t trace the entire side, can it? Here a piece of data came to this particular component and ... that's it? ... However, I’m just starting, I’ll be grateful if they explain this point to me) I heard that they advise Apollo instead of redax, but so far I can’t imagine it ... I was thinking about the possibility of combining - Apollo for queries and receiving data, and redax a saga to organize those queries and store that data

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question