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(useStorage): isLoading becoming false before returning value #59

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kirkwat
Copy link

@kirkwat kirkwat commented Nov 5, 2024

When using the useStorage hook with the isLoading value, I ran into issues because the hook would return isLoading as false before returning a value even if it's present in storage. This fix has been working for me which ensures the value is returned before isLoading becomes false.

(I should also mention that the current isLoading solution works when I'm using smaller values like strings but not when I'm using objects or lists)

Before:
before
After:
after

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.

1 participant