Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache on useSWRConfig is delayed #3056

Open
vinodhum opened this issue Dec 19, 2024 · 1 comment
Open

cache on useSWRConfig is delayed #3056

vinodhum opened this issue Dec 19, 2024 · 1 comment

Comments

@vinodhum
Copy link

Bug report

I am trying to access global cache using useSWRConfig and updated cache is delayed by few seconds.

const { cache } = useSWRConfig
is there any other way to subscribe to global cache ?

Description / Observed Behavior

What kind of issues did you encounter with SWR?

Expected Behavior

How did you expect SWR to behave here?

Repro Steps / Code Example

Or share your code snippet or a CodeSandbox link is also appreciated!

Additional Context

SWR version.
Add any other context about the problem here.

@vinodhum
Copy link
Author

quick update looks like cache is updated, after rerender only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant