Implementation of localStorage

How Can i use localStorage in vsf ?

You can take a look at the wishlist module:

and based on it, create your own module in src/modules

didn’t check, but this line:

loadFromCache () {
    const wishlistStorage = StorageManager.get('wishlist')
    return wishlistStorage.getItem('current-wishlist')

seems to be responsible for reading the localstorage keys at shop/wishlist/current-wishlist localstorage key which you can see being used on

the above should give you a good starting point on implementing your own keys and groups

1 Like