-
Notifications
You must be signed in to change notification settings - Fork 97
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
Error when new value is not JSON #16
Comments
It might be simple enough to short circuit when |
Hi, I see this got fixed. Could you publish to NPM a new version for this fix? :) |
Would very much appreciate this fix! :) |
@donavon any chance you could publish a new version with this fix to NPM? |
Hi @donavon, so can you publish to NPM a new version with this fix :) ? |
Hi All, Just +1'ing this for a fix as well. Not sure if we want to make it safer to use try {} catch for added safety also? |
@donavon Would really appreciate this fix |
@donavon, +1 - looking forward to the NPM version with this fix. Thanks for the great hook |
@donavon +1! :) |
I have tweeted @donavon here https://twitter.com/deevus/status/1221934141488283649 |
1+ broke my app because of this haha |
It looks like some nice person has published version 0.3.1 here https://www.npmjs.com/package/@smartrent/use-persisted-state If you don't want to change your import references to
|
I see this module is not well maintained anymore. You could check out the module I built https://github.com/astoilkov/use-local-storage-state. The good thing is we used it in our production app so maintenance should be solid. |
See line 12 below:
use-persisted-state/src/usePersistedState.js
Lines 11 to 16 in 02a847a
Other modules may use localStorage and not store JSON.
The text was updated successfully, but these errors were encountered: