vue-hooks-plus

Vue hooks library


Keywords
vue-hooks-plus, vue hooks, typeScript, hooks-library, vue-hooks-library, vue3
License
MIT
Install
npm install vue-hooks-plus@1.7.3

Documentation

npm package build status language librariesio LICENSE

VueHooks Plus

English | ็ฎ€ไฝ“ไธญๆ–‡

High performance & Simplicity Vue3 Hooks library

โœจ Features

  • ๐Ÿ„๐Ÿผโ€โ™‚๏ธ Easy to learn and use
  • ๐Ÿ”‹ Supports SSR
  • ๐Ÿ›ธ Contains a comprehensive collection of basic Hooks
  • ๐ŸŸ๏ธ A wide range of application scenarios
  • ๐Ÿฆพ Preferred useRequest, Powerful request middle tier
  • ๐ŸŽช Interactive demo, immersive
  • ๐ŸŽฏ Written in TypeScript with predictable static types
  • ๐Ÿช„ Support the on-demand load, and reduce the packing volume
  • ๐Ÿคบ Playground, there's ample scope for one's abilities
  • ๐Ÿ” Perfect test, safe and reliable

๐Ÿ“ฆ Install

npm i vue-hooks-plus

CDN

<script src="https://cdn.jsdelivr.net/npm/vue-hooks-plus/dist/js/index.iife.js"></script>

It will be exposed to global as VueHooks_Plus

๐Ÿคนโ€โ™€๏ธ Usage

import { useRequest } from 'vue-hooks-plus'

Introduced on demand

import useRequest from 'vue-hooks-plus/es/useRequest'

Auto Import

Vite
import AutoImport from 'unplugin-auto-import/vite'
import { VueHooksPlusResolver } from '@vue-hooks-plus/resolvers'

export const AutoImportDeps = () =>
  AutoImport({
    imports: ['vue', 'vue-router'],
    include: [/\.[tj]sx?$/, /\.vue$/, /\.vue\?vue/, /\.md$/],
    dts: 'src/auto-imports.d.ts',
    resolvers: [VueHooksPlusResolver()],
  })


Webpack
const { VueHooksPlusResolver } = require('@vue-hooks-plus/resolvers')
module.exports = {
  /* ... */
  plugins: [
    require('unplugin-auto-import/webpack')({
      imports: ['vue', 'vue-router'],
      include: [/\.[tj]sx?$/, /\.vue$/, /\.vue\?vue/, /\.md$/],
      dts: 'src/auto-imports.d.ts',
      resolvers: [VueHooksPlusResolver()],
    }),
  ],
}


For other supported tools, please see unplugin-auto-import

Globalization Documentations

Example

๐Ÿคฉ Awesome

Template

๐Ÿชด Project Activity

Alt

Contributing

Welcome to join us! You can check out the Contributing Guide to learn how to get started.

Contributors

Thanks for all their contributions ๐Ÿ !

๐ŸŒธ Thanks

This project is heavily inspired by the following awesome projects.

๐Ÿ“„ License

MIT License ยฉ 2022-PRESENT YongGit