VueHooks Plus is a high-performance and simple library offering a comprehensive collection of Vue 3 composition API hooks. It is currently stable at version 2.4.3 and demonstrates an active development cadence with frequent minor and patch releases. Key differentiators include its robust `useRequest` hook for powerful request management, full TypeScript support with predictable static types, SSR compatibility, and support for on-demand loading and auto-imports via resolvers like `@vue-hooks-plus/resolvers`. The library aims to provide a rich set of utilities for common Vue development patterns, promoting reusability and simplifying complex logic within Vue 3 applications.
npm install vue-hooks-plusVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to use the `useRequest` hook to fetch data, handle loading and error states, and dynamically change parameters, including polling.
Review project dependencies and imports. If directly using lodash functionality, ensure you are importing from `lodash-es` for tree-shaking benefits or update your import paths.
Verify that `unplugin-auto-import` and `@vue-hooks-plus/resolvers` are installed as dev dependencies, and that your `vite.config.ts` or `webpack.config.js` includes the correct resolver configuration as shown in the documentation.
Thoroughly test `useRequest` implementations in environments with potential concurrent requests after upgrading to `v2.4.0` to ensure no unexpected side effects or race conditions arise, especially in scenarios where state mutation order is critical.
Ensure you are using ES Module import syntax: `import { useRequest } from 'vue-hooks-plus'` in a module-aware environment (e.g., modern Vite/Webpack setup).If manually importing, ensure `import { useRequest } from 'vue-hooks-plus'` is present. If using auto-import, verify `@vue-hooks-plus/resolvers` is correctly configured in your build tool and that `src/auto-imports.d.ts` (or similar) has been generated.Ensure that reactive variables (like those returned by `ref`, `computed`, or some hook properties) are explicitly unwrapped or accessed with `.value` where appropriate, especially within `<script setup>` or template expressions where auto-unwrapping might not apply.