-
-
Notifications
You must be signed in to change notification settings - Fork 662
fix(utils): avoid catching storage error in atomWithStorage #1363
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 9c850c2:
|
Size Change: +691 B (0%) Total Size: 147 kB
ℹ️ View Unchanged
|
I'm unfamiliar with symbols. What is the benefit of Symbols as opposed to strings? |
A string would work too. A symbol is unique, so no conflicting risks. (edit) a string would work if we throw it, but it now returns, so a symbol would be required. |
close #1347
I ended up with introducing a symbol and removing big try-catch completely.
(while I originally thought about throwing a symbol or something, returning a symbol should be cleaner.)
I had to fix a test for #949.
Also, did a tweak for
.subscribe
#1004, to work with nondefaultStorage
. (There was an issue/discussion which I don't remember.)