Why when RTK is mid query, on refresh, isFetching stays true and will not update, despite doing refetch or already having data? #3513
-
I have a strange issue where RTK is getting stuck in the isFetching state on refresh only. If I clear sessionStorage and load the page it runs the queries and it loads the data. On tab change it even refetches the data successfully. However if the data is still fetching and I refresh, when the page loads the isFetching is still stuck in the same state and will not change. I'm not sure what the cause is, maybe something with redux persist or caching? Here is a video recording of the issue: https://www.loom.com/share/8a3b83d4442d4cbf9b0e6dc393e6638d Here is the code for that component where the queries are happening:
Title.displayName = 'ViewStrategyPageTitle'; |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Turned out that redux-persistance was caching the queries for rtk, causing the isFetching state to get stuck. By removing the rtk redux-persistance in the store.ts it fixed the issue |
Beta Was this translation helpful? Give feedback.
Turned out that redux-persistance was caching the queries for rtk, causing the isFetching state to get stuck.
By removing the rtk redux-persistance in the store.ts it fixed the issue