vue2-request-utils
v1.2.5
Published
Vue 3 composition API for data fetching. This is a version for Vue 2 by using @vue/composition-api.
Downloads
28
Maintainers
Readme
English | 简体中文
Documentation
Install
npm install vue2-request-utils
# or with yarn
yarn add vue2-request-utils
Usage
import { useRequest } from "vue2-request-utils";
export default {
setup() {
const { data } = useRequest("api/user");
return () => <div>{data.value}</div>;
},
};