You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, I want to revalidate manually at some time, eg. every time the clusters page show (after cluster created and navigate to this page), so there's the following code in .vue file:
@adamdehaven Thanks for your replay, but it still not work. cacheKey actually increased, but didn't revalidate immediately.
And there's a TS error when set () => cacheKey.value && '/cnpgs': The type '() => string | 0' cannot be assigned to the type 'IKey'. Also when I use () => Boolean(cacheKey.value) && '/cnpgs'.
I'm using swrv in Vue3 + Pinia project.
In the Pinia store there's the following code:
Now, I want to revalidate manually at some time, eg. every time the clusters page show (after cluster created and navigate to this page), so there's the following code in .vue file:
But this didn't trigger revalidate and "watch" observer, also the clusters data is the old, not the latest.
Is there some logic error of my code or bug? What's the right way to revalidate manually and refresh data immediately? Thanks guys.
The text was updated successfully, but these errors were encountered: