How to use middleware from different APIs in the same store #1549
Unanswered
apstechlead
asked this question in
Q&A
Replies: 1 comment 2 replies
-
I would assume you did not provide a That said, there is a 99% chance that you should not have multiple apis, but one big api. Multiple apis would mean "one api for facebook and one api for a car rental". One api would be "multiple endpoints, but the data has any kind of relation with each other". Stuff like invalidation etc. does not work over api borders. It is very likely that you want one api and use code splitting to split that up in multiple files. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Could someone please share how you configure your store using different api reducers? Specifically how you concatenate the middleware. I'm trying to register the middleware of 2 different APIs and I can't seem to find the way. Chaining concat calls is not working for me. They both work fine individually, but when I register both I'm facing issues.
This is my store configuration:
The middleware property is throwing a type error. Even if I force-compile I'm getting the following runtime error hinting that the middleware is not present:
Unhandled Rejection (TypeError): Cannot read properties of undefined (reading 'providesTags')
Any assistance here would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions