Skip to content

Handle schema parse errors #5

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sebastinez
Copy link

If there is an existing localStorage entry for key, the library should not throw an error, but replace the existing localStorage entry with the initialValue.

This allows users of this library to modify stores with new schemas with ease.

I'm aware that this can also be handled by users of this library with a try catch, though IMO most people would prefer to instantiate their stores as mentioned in the README, but without the possible foot gun that their deployments are gonna break.

Open for any feedback or changes.

sebastinez added a commit to radicle-dev/radicle-explorer that referenced this pull request Nov 25, 2024
Also moving the svelte-stored-writable package into the repo.
So we have it closer for maintenance, we can eventually rewrite it in
svelte 5 runes later.

Reference: efstajas/svelte-stored-writable#5
sebastinez added a commit to radicle-dev/radicle-explorer that referenced this pull request Nov 25, 2024
Also moving the svelte-stored-writable package into the repo.
So we have it closer for maintenance, we can eventually rewrite it in
svelte 5 runes later.

Reference: efstajas/svelte-stored-writable#5
sebastinez added a commit to radicle-dev/radicle-explorer that referenced this pull request Nov 25, 2024
Also moving the svelte-stored-writable package into the repo.
So we have it closer for maintenance, we can eventually rewrite it in
svelte 5 runes later.

Reference: efstajas/svelte-stored-writable#5
If there is an existing localStorage entry for `key`, the library should
not throw an error, but replace the existing `localStorage` entry with
the `initialValue`.

This allows users of this library to modify stores with new schemas with
ease.
@sebastinez sebastinez force-pushed the sebastinez/handle-schema-parse-errors branch from 0ab6e78 to b1c810c Compare November 25, 2024 16:34
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