svelte-stored-writable icon indicating copy to clipboard operation
svelte-stored-writable copied to clipboard

Handle schema parse errors

Open sebastinez opened this issue 1 year ago β€’ 0 comments
trafficstars

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 avatar Nov 12 '24 09:11 sebastinez