RTK Query: Best way to fetch two endpoints (one after the other) ? #1367
Answered
by
AlbinCederblad
AlbinCederblad
asked this question in
Q&A
-
I need to query the first endpoint to get an ID to be able to fetch the correct data from the 2nd endpoint. Any way to do this with RTK Query? I'm trying to convert as much as possible to use RTK Query instead of action/reducer/slice. Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
AlbinCederblad
Jul 30, 2021
Replies: 1 comment 3 replies
-
i think i found it; https://redux-toolkit.js.org/rtk-query/usage/customizing-queries#performing-multiple-requests-with-a-single-query |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
AlbinCederblad
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i think i found it; https://redux-toolkit.js.org/rtk-query/usage/customizing-queries#performing-multiple-requests-with-a-single-query