You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I declare two with the same name on the endpoint, even if they are imported from different files, it takes it as if it were the same and keeps the first one that makes a request and the second no longer makes it.
this is intended and documented behaviour. in development mode, you'll get a warning in console about it. remember, you're injecting into the same api instance, not creating a new one.
If I declare two with the same name on the endpoint, even if they are imported from different files, it takes it as if it were the same and keeps the first one that makes a request and the second no longer makes it.
Example:
In ‘/products.js’
const productsApi = baseApi.injectEndpoints ({
endpoints: builder => ({
getProducts: ...
})
})
export const {
useGetProductsQuery,
….
} = productsApi;
In ’/stats.js’
const statsApi = baseApi.injectEndpoints ({
endpoints: builder => ({
getProducts: ...
})
})
export const {
useGetProductsQuery,
….
} = statsApi;
The text was updated successfully, but these errors were encountered: