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

fix: cache currentuser composable #386

Merged
merged 3 commits into from
Apr 16, 2024
Merged

Conversation

andreasgangso
Copy link
Member

Normally useAsyncData with a key and dedupe is enough, as it's cached, but since this is only used 1 place in the app, the cache clears whenever all "listening" scopes have unmounted. So we need to cache the thing.

Feels like it should be simpler than this but I couldn't think of anything if one wants to use useAsyncData (it's handy as it gives you loading states etc ootb).

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://kind-meadow-01b17e903-386.westeurope.3.azurestaticapps.net

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://kind-meadow-01b17e903-386.westeurope.3.azurestaticapps.net

@kkuepper kkuepper merged commit ddc603d into main Apr 16, 2024
8 checks passed
@kkuepper kkuepper deleted the fix/cache-currentuser-composable branch April 16, 2024 19:25
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

Successfully merging this pull request may close these issues.

2 participants