Persisted Store

Useful for user settings that don’t need saved in a database. First argument is the key, second is the value, and add an optional true third argument to sync across tabs.

const showSomething = createPersistedStore<boolean>('myCustomKeyName', true, true);

The type definition will be automatically inferred from the value passed in, though you can explicitly type it as seen in the example here to enforce a desired type.

tab synced

Tab syncing can be seen if you open this page in two tabs and toggle the value.

Edit page on GitHub
Instrument Panel