Code Monkey home page Code Monkey logo

v3-use's Introduction

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
  • Scene

  • Dom

    • useTitle — 用于设置页面标题的 Hook
  • Effect

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

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

v3-use's People

Contributors

ismufang avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.