# vue-use-chrome-storage

> Chrome storage hook for vue3

Latest version **1.1.3** (published 2022-04-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-use-chrome-storage
pnpm add vue-use-chrome-storage
yarn add vue-use-chrome-storage
bun add vue-use-chrome-storage
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2022-04-06 |
| First published | 2022-04-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | laefad |
| Maintainers | laefad |
| Keywords | vue3, chrome storage |

## Links

- npm: https://www.npmjs.com/package/vue-use-chrome-storage
- Repository: https://github.com/laefad/vue-use-chrome-storage
- Homepage: https://github.com/laefad/vue-use-chrome-storage#readme
- Issues: https://github.com/laefad/vue-use-chrome-storage/issues
- npm.io page: https://npm.io/package/vue-use-chrome-storage

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 1.1.3 (latest) — 2022-04-06
- 1.1.2 — 2022-04-06
- 1.1.1 — 2022-04-04
- 1.1.0 — 2022-04-04

## README

# vue-use-chrome-storage

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

# Install

```bash
npm i vue-use-chrome-storage
```

# Example Usage 
```ts
<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

---
_Source: https://npm.io/package/vue-use-chrome-storage · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
