Responsive local storage plugin for Vue 2 and Vue 3 (v2.2.0). Persists reactive state to localStorage with automatic syncing. Supports tree-shaking, custom namespacing, and zero additional dependencies. Lightweight (~1.76 KB source). Differentiator: maintains reactivity across page refreshes without Vuex/Pinia, and works with both Vue major versions. Released under MIT, maintained on GitHub.
npm install responsive-storageNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to install the plugin and define reactive local storage items with defaults in Vue 3.
Always use the same nameSpace string in both places, e.g., { nameSpace: 'xx_' } and Storage.getData('key', 'xx_').Conditionally set options based on Vue version: { version: 2, ... } for Vue 2, omit version for Vue 3.Use Storage.getData('key') ?? defaultValue to provide fallback.N/A
Use app.use(Storage, ... ) instead of Vue.use().
Use Storage.getData('starValue') ?? defaultValue.Ensure import: import Storage from 'responsive-storage'. If using CommonJS, require('responsive-storage').default.No dependency data recorded yet.