Package Exports
- vue-request
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vue-request) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
English | 简体中文
VueRequest
Status: Beta
Features
- 🚀 All data is reactive
- 🔄 Interval polling
- 🤖 Automatic error retry
- 🗄 Built-in cache
- 📠 Written in TypeScript
- 🍃 Lightweight
- 📦 Out of the box
- 🔥 Interactive docs
Install
npm install vue-request
# or with yarn
yarn add vue-requestCDN
<script src="https://unpkg.com/vue-request"></script>It will be exposed to global as window.VueRequest.useRequest
Usage
import { useRequest } from 'vue-request';
export default {
setup() {
const { data } = useRequest('api/user');
return () => <div>{data.value}</div>;
},
};TODO List
If you have any cool features, please submit an issue for discussion
- Documentation
- Pagination
- Load More
- Support Vue 2
Thanks
Thank them for inspiring us.
Thanks to xiadd for providing the awesome vue-request npm package name!
License
MIT License © 2020-present AttoJS