Releases: axios-use/axios-use-vue
Releases · axios-use/axios-use-vue
0.2.5
12 Jan 09:16
Compare
Sorry, something went wrong.
No results found
Bug Fixes
useRequest: revert hasPending recomputed (sources) (d349846 )
Features
types: FullRefArrayItem compatible with MaybeRef (8082b72 )
0.2.4
09 Jan 08:45
Compare
Sorry, something went wrong.
No results found
Bug Fixes
useRequest: cancel-sources comparison failed (vue reactivity in depth) (6e60503 )
0.2.3
04 Jan 08:35
Compare
Sorry, something went wrong.
No results found
Bug Fixes
types: type directory error (eaeba42 )
0.2.2
21 Nov 12:24
Compare
Sorry, something went wrong.
No results found
Feature
build: add umd modules and type: module (b198da0 )
0.2.1
05 Jun 03:00
Compare
Sorry, something went wrong.
No results found
Features
types: any replaces unknown as the response type when using js (d23653c )
0.2.0
22 May 08:01
Compare
Sorry, something went wrong.
No results found
Bug Fixes
type: onCompleted response generic error (3c7e56f )
Features
request: export _request function to custom data or response type (4ad4896 , ec40987 )
options: getResponseItem options (custom data value) (#1 )
const [ reqState ] = useResource ( ( ) => _request < MyResponse < UserList > > ( { url : `/users` } ) ) ;
0.1.1
15 Apr 10:56
Compare
Sorry, something went wrong.
No results found
Bug Fixes
context: support vue 2 (provide) (7013478 )
Features
content: provide_key to Symbol (23c9c32 )
types: support vue2 type (3d22979 )
0.1.0
03 Apr 02:51
Compare
Sorry, something went wrong.
No results found
A Vue composition utilities for Axios. Lightweight, cancelable and less change.
Quick Start
<script setup>
import { defineProps , toRef } from " vue" ;
import { useResource } from " @axios-use/vue" ;
const props = defineProps ([" userId" ]);
const userId = toRef (props, " userId" );
const [reqState ] = useResource ((id ) => ({ url: ` /user/${ id} ` }), [userId]);
</script >
<template >
<div v-if =" reqState.error" >{{ reqState.error?.message || "error" }}</div >
<div v-else-if =" reqState.isLoading === false" >{{ reqState.data?.name }}</div >
<div v-else >...</div >
</template >
import { useRequest , useResource } from "@axios-use/vue" ;