petite-vue-hooks
TypeScript icon, indicating that this package has built-in type declarations

0.0.7-0 • Public • Published

petite-vue-hooks

A tiny vue hooks as its name.

It is wip. Don't use it in production.

Features

Installation

npm i petite-vue-hooks
# or yarn
yarn add petite-vue-hooks
# or pnpm
pnpm add petite-vue-hooks

Usage

<script setup>
  import { useSessionStorage } from 'petit-vue-hooks'

  // reactive sessionStorage 
  const [age_ss] = useSessionStorage('age', 'sessionStorage value')

  function changeAge() {
    age_ss.value = 'reset sessionStorage ' + Math.random()
  }
</script>

<template>
  <h3>{{ age_ss }}</h3>
  <button @click="changeAge">change age_ss</button>
</template>

Package Sidebar

Install

npm i petite-vue-hooks

Weekly Downloads

1

Version

0.0.7-0

License

MIT

Unpacked Size

10 kB

Total Files

12

Last publish

Collaborators

  • zhou-qi-jun