Not available storage fails silently
See original GitHub issueHello there 👋 ,
First of all, I really really like zustand as a state management tool and I’m a big fan of it.
I just noticed one small thing. When using the persist
middleware to add the state to the localStorage
or sessionStorage
and the application doesn’t allow to access it for example when used in an SSR application, the error or the fact that is not available is not notified to the user or the developer.
This means it fails silently and when you are not checking the storage yourself you might expect it being saved, but it’s not.
I think by adding some warning
or information within the console here in the middleware.ts
file like this could save some debugging time:
try {
storage = getStorage()
} catch (e) {
console.warn("You try to persist your state, but the storage is currently not available in your application")
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:10
Top Results From Across the Web
4 Ways to Fix the "Not Enough Disk Space for Windows 10 ...
But before the installation process starts, Windows checks to ensure there's enough storage space on your internal drive. If there isn't enough ......
Read more >Mounting fails silently, all of a sudden - Unix Stack Exchange
(mounting points was the one for the disk before it disappeared) there is no error... but, still nothing. Even in df command it...
Read more >How To Fix "Not Enough Storage Is Available To Process This ...
The easiest fix is to restart the PC and start over again. But, doing so means you lose any ongoing work on your...
Read more >Error: Not enough storage is available to process this command
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanServer\Parameters 3. Locate ; IRPStackSize 4. If this value does not exist Right Click ...
Read more >How to Fix There is Not Enough Space on the Disk to ...
Fix 1: Rescan Disks in Disk Management · Fix 2: Check Current Partitions · Fix 3: Convert Basic Disk to Dynamic · Fix...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Perfect! i was using 3.2.0 so i was behind #275
Ah! What version of zustand are you using? This should be fixed since 3.3.0 (see #275)