prhttp-vue
v1.0.0
Published
Vue Component lifecycle binding for prhttp
Downloads
1
Readme
prhttp-vue
Vue Component lifecycle binding for prhttp
Installation
npm install prhttp-vue
Usage
Vue 2.x
Use Mixin
import {lifecycleMixin} from 'prhttp-vue'
// PrHttpClient instance
const httpClient = /.../
export default {
mixins: [lifecycleMixin(httpClient)],
}
Composition API
Bind lifecycle in <script setup>
or setup()
import { bindVue3Lifecycle } from 'prhttp-vue'
// PrHttpClient instance
const httpClient = /.../
bindVue3Lifecycle(httpClient)