RTK Query in Nx monorepo #5057
Unanswered
michalvadak
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey, I have an Nx monorepo with multiple apps, each with its own Redux Toolkit store. All apps use the same base API. Some endpoints are shared across all apps, while others are used by only a few. I'm using Redux Toolkit's code generation for RTK Query.
I have API "slices" that are shared across all apps, which are injected via
injectEndpoints
. I want to structure this so that the shared API slice is not recreated separately for each app, especially since I'm also usingenhanceEndpoints
and want to avoid duplicating code. What’s the best approach to achieve this?Beta Was this translation helpful? Give feedback.
All reactions