1.1.3 • Published 2 years ago

vue-use-chrome-storage v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

vue-use-chrome-storage

This package is used to integrate the chrome storage with the vue framework through this hook.

Install

npm i vue-use-chrome-storage

Example Usage

<template>
    <button
        @click="onClick"
    >
        Hide
    </button>
    <p v-if="chromeStorage.state.visible">
        Visible
    </p>
</template>
<script setup lang="ts">
import { useChromeStorage } from 'vue-use-chrome-storage';

const chromeStorage = useChromeStorage({
    id: 'visible', 
    defaultState: {
        visible: true
    }, 
    storageArea: 'local'
});

const onClick = () => {
    chromeStorage.state.visible = !chromeStorage.state.visible;
};
</script>

Remark

  1. Works only with objects in store.
  2. Not fully tested
    • Not tested with a managed store type
    • Error catching was also not tested
1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago