VueJS RESTful client with reactive features. Vue-Chimera is based on axios http client library.
Overview of features:
- Loading flags
- Binding vue instances to API endpoints
- Reactive endpoints and auto request based on vue instance data
- Auto refreshing data
- Serverside prefetching (Nuxt.js compatible)
- Request cancellation
- Cancel all pending requests on vue instance destroy (like route changes)
$ npm install vue-chimeraor$ yarn add vue-chimera
To add vue-chimera to your Vue you must use it as a plugin: ECMAScript 6
Using with Nuxt.js
You can use Vue-Chimera with nuxtjs to use it's SSR features so you can easily prefetch the data.
// nuxt.config.jsmoduleexports =modules:'vue-chimera/nuxt'chimera:// Enables server side prefetch on endpoints which has `auto` property// true: fetched on server// false: fetched on client// 'override': fetched on server and client (overrided by client)prefetch: trueprefetchTimeout: 2000 // Server side timeout for prefetch
All PRs are welcome. Thanks.