Replies: 1 comment 8 replies
-
Have you tried |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
I'm using Zustand persist middleware with a custom storage adapter that makes async API calls. I want to show loading states during these async operations (like auto-save mode), but I'm struggling with the best approach.
Current Implementation
Questions
What's the recommended pattern for showing loading states during persist operations?
Are there any built-in mechanisms in Zustand persist for handling async operation states?
What I've tried
onRehydrateStorage
: This only runs when hydrating, not when setting the state, so it doesn't give any meaningful results.Desired Behavior
Environment
Looking for best practices or recommended patterns for this scenario.
Beta Was this translation helpful? Give feedback.
All reactions