New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

v3-use

Package Overview
Dependencies
Maintainers
0
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

v3-use

Vue3 Hooks library

latest
Source
npmnpm
Version
1.1.2
Version published
Maintainers
0
Created
Source

v3-use

v3-use is a high-quality and reliable Vue3 Hooks library.

npm(tag) codecov

Install

$ npm install --save v3-use
# or
$ yarn add v3-use
# or
$ pnpm add v3-use

Usage

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

Hooks

  • State

    • useState — 管理 state 的 Hook
    • useReducer — 适用于复杂状态管理的 Hook
    • useToggle — 用于在两个状态值间切换的 Hook
    • useBoolean — 管理 boolean 值的 Hook
    • useDefault — 当 state 为nullundefined时返回默认值
  • Scene

  • Browser

  • Effect

    • useTimeout — 一个可以处理 setTimeout 的 Hook
    • useInterval — 一个可以处理 setInterval 的 Hook
  • LifeCycle

    • useEffect — 方便管理生命周期的 Hook,立即运行一个函数,同时响应式地追踪其依赖,并在依赖更改时重新执行
    • useEffectOnce — 只在mountedbeforeUnmount阶段执行的生命周期
    • useFirstMountState — 检测当前是否为第一次渲染
    • useLogger — 在控制台记录 vue 生命周期变化的 Hook

Keywords

vue3-hooks

FAQs

Package last updated on 09 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts