JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q16478F
  • License MIT

A Hooks Library for Vue3 and 2

Package Exports

  • vue-uses
  • vue-uses/esm/index.js
  • vue-uses/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vue-uses) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

vue-uses

A Hooks Library for Vue3 and 2

English | 简体中文

Install

$ npm install --save vue-uses
# or
$ yarn add vue-uses
# or
$ pnpm add vue-uses

Usage

import { useBoolean } from 'vue-uses'
const [state, { toggle, setFalse, setTrue }] = useBoolean()

Hooks

  • State

  • Scene

  • Effect

  • LifeCycle

    • useEffect — conveniently managing component lifecycle, running a function immediately, tracking its dependencies reactively, and re-executing when dependencies change.
    • useEffectOnce — a lifecycle function only during the mounted and beforeUnmount phases.
    • useFirstMountState — detecting whether the current render is the first render.
    • useLogger — logging Vue lifecycle changes to the console.