Is keepUnusedDataFor property won't work for the already mounted component? #3041
mavericksab81
started this conversation in
General
Replies: 1 comment 1 reply
-
I think you want to use polling |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a get call which I am dispatching on the component when mounted. But, there is requirement where I have to refetch after some time elapsed, ex- 30 seconds.
But, as per the docs, keepUnusedDataFor works only when the component is unmounted and mounted again within the time frame.
So, currently, I am doing conditional refetech after the last fulfilledTimeStamp and currentTimestamp diff. Is there any better way to do that.
If we do using the refetchOnMountOrArgChange, then also the situation remains the same.
Thoughts pls.
Beta Was this translation helpful? Give feedback.
All reactions