SolidJSS
SolidJSโ€ข3y agoโ€ข
8 replies
aryzing

How to clear a store?

From the docs, seems that setting a store's value explicitly to
undefined
will delete it from the store,

setStore({foo: undefined}) // foo is removed from store


However, is there a way to clear them all in one go? If there are many keys, or the keys change, it's hard to ensure they're all getting deleted when they need to.
Was this page helpful?