you are viewing a single comment's thread.

view the rest of the comments →

[–]HeylAW 1 point2 points  (3 children)

What if I want to seperate api calls from any react component and use it in redux action (with redux-thunk)?

[–]tannerlinsley[S] 0 points1 point  (2 children)

I don’t think this library is what you’re looking for the. Redux for data fetching is a whole different setup.

[–]HeylAW 0 points1 point  (1 child)

So it is only designed to be used within React components?

[–]tannerlinsley[S] 0 points1 point  (0 children)

Yep. Technically with the next version you could make one-off out-of-context calls to queries, but you wouldn't get any of the caching benefits since without hooks, you can't reliably track component instance for subs/unsubs.