REST API client for Vue.js applications (v1.2.1-b). Integrates with Pinia for state management and Vue 3 Composition API. Provides composable functions for CRUD operations, automatic request deduplication, and reactive data fetching. Ships TypeScript types. Active development with monthly releases.
npm install rest-client-vueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows minimal setup: create a REST client instance, register Pinia, and install the plugin on a Vue 3 app.
Migrate from `app.use(RestClientPlugin, { client: () => createRestClient({...}) })` to `app.use(RestClientPlugin, { client: createRestClient({...}) })`.Replace `useRestClient().fetch('url', (data) => ...)` with `useRestClient().fetch('url', { onResponse: (data) => ... })`.Use `import` syntax instead of `require()`. If you need CJS, stick to v1.2.0.
Ensure `app.use(createPinia())` is called before `app.use(RestClientPlugin, ...)`.
Set `"strict": true` in your `compilerOptions`.
Ensure the package is installed: `npm install rest-client-vue`. For TypeScript, verify `node_modules/rest-client-vue` contains `index.d.ts`.
Install Pinia (`npm install pinia`) and call `app.use(createPinia())` before `app.use(RestClientPlugin, ...)`.
Use `shallowRef` or `markRaw` on data objects to avoid deep reactivity on large payloads.