Replies: 1 comment
-
i find a reason to cause the problem. Thank you very much. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
ordermgmt component using ordermgmtapislice (GET /api/ordermgmt)
productmgmt component using productmgmtapislice (GET /api/product)
when i go to productmgmt component, it will read /api/ordermgmt api. i refetch the webpage. i still read /api/ordermgmt.
i checked productmgmt component. it is using productmgmtapislice to get product data. Althought productmgmt component can get product data, it will read /api/ordermgmt data.
In ordermgmtapislice, i use providesTags: ['Orders'] to store ordermgmt data.
it is is my productmgmtapislice program:
import { apiSlice } from "../../redux/api/apiSlice";
export const ProductMgmtApiSlice = apiSlice.injectEndpoints({
endpoints: builder => ({
getProductdata: builder.query({
query: () => '/product',
}),
}),
})
export const {
useGetProductdataQuery,
} = ProductMgmtApiSlice
Thank you very much.
Beta Was this translation helpful? Give feedback.
All reactions