Replies: 2 comments 2 replies
-
Hi Holf! Can you explain a little about the use case where you don't want to sync across tabs? Wouldn't you be better off with a |
Beta Was this translation helpful? Give feedback.
2 replies
-
There is now a config option to disable syncing across tabs. See: #226 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I see this code, which propagates state changes across instances of the same app in different browsers and tabs:
svelte-persisted-store/index.ts
Lines 56 to 65 in dde5ece
Might you consider an option to
disable this behaviourselectively control this behaviour?I'm thinking perhaps the
persisted
could additionally return anupdateOtherTabs(enabled: boolean)
, which would allow you to turn this behaviour on and off.This flag would determine whether or not the
set
on line 59 is called.Alternatively, we could have the option to pass in our own
handleStorage
function?Beta Was this translation helpful? Give feedback.
All reactions