kirill-konshin/next-redux-wrapper

rtkQuery subscriptions bug

PouryaNoufallah96 opened this issue · 1 comments

hello
i updated package to version 9.0.0-rc.2 and I'm using rtkQuery. when I fetch data in ssr and then I set wrapper.useHydration(props), when I leave the page the subscription is still active:
image

even when I add this keepUnusedDataFor: 60 property to createApi and the cache is not getting cleared.

even in your demo-redux-toolkit project in pokemon page, this is happening. when we call rtkQuery API from getServerSideProps, it's subscription is not unsubscribe when we leave the page:
image

here's an example when I entered pokemon page 5 times and leave, it's subscriptions still exist