我正在尝试console.log()对post请求成功,但一般会有ws订阅或状态更新
const [fetchList, list] = rtkApi.useListMutation({
fixedCacheKey: 'FIXED_CACHE_KEY',
});
...
list: builder.mutation({
query: () => ({
method: "POST",
url: `/some-url`,
}),
async onCacheEntryAdded(arg, { cacheDataLoaded, cacheEntryRemoved }) {
console.log("log me please");
await cacheDataLoaded;
console.log("log again");
查看源代码,我可以看到getCacheKey
不处理这种情况-您可以打开一个问题,以便我们可以跟踪和解决这个问题吗?