Save And Load Data Across Browser Sessions – VueStorage

The VueStorage allows components to save and load their data across browser sessions.

Compatible with both Vue.js 2 and Vue.js 3.

Usage:

function() {

  new Vue({
    el: '#App',

    data: {
      storageKey: 'test',
    },

    stored: {
      value: {
        type: JSON,
        key: function() {
          return this.storageKey;
        },
        default: function() {
          return [];
        },
      },
    },
  });

})();

Preview:

VueStorage

Changelog:

11/18/2020

  • v1.1.1: remove unnecessary operations

10/25/2020

  • v1.1.0

10/18/2020

  • v1.0.2

10/04/2020

  • fix key as function for Options API

09/24/2020

  • Updated for Vue.js 3

Download Details:

Author: SeregPie

Live Demo: https://seregpie.github.io/VueStorage/

Download Link: https://github.com/SeregPie/VueStorage/archive/master.zip

Official Website: https://github.com/SeregPie/VueStorage

Install & Download:

# NPM
$ npm install vuestorage --save

Add Comment