S
SolidJS8mo ago
zimo

Delete key in store

How do I delete a key in a store? My store is typed so I can't simply set the value to undefined. Will I have to use the mutate helper, whatever it's called? I'm used to changing keys in a store by just doing setMyStore("my_key", value);
2 Replies
peerreynders
peerreynders8mo ago
Did you try a non-null assertion? setStore('my_key', undefined!) https://www.solidjs.com/docs/latest/api#updating-stores
SolidJS
Solid is a purely reactive library. It was designed from the ground up with a reactive core. It's influenced by reactive principles developed by previous libraries.
zimo
zimoOP8mo ago
I've never seen that before. Thanks!
Want results from more Discord servers?
Add your server