English | 简体中文
- 🚀 All data is reactive
- 🔄 Interval polling
- 🤖 Automatic error retry
- 🗄 Built-in cache
- 📠 Written in TypeScript
- 🍃 Lightweight
- 📦 Out of the box
- 🔥 Interactive docs
npm install vue-request@beta
# or with yarn
yarn add vue-request@beta
<script src="https://unpkg.com/vue-request@beta"></script>
It will be exposed to global as window.VueRequest.useRequest
import { useRequest } from 'vue-request';
export default {
setup() {
const { data } = useRequest('api/user');
return () => <div>{data.value}</div>;
},
};
If you have any cool features, please submit an issue for discussion
- Documentation
- Pagination
- Load More
- Support Vue 2
Thank them for inspiring us.
Thanks to xiadd for providing the awesome vue-request npm package name!
MIT License © 2020-present AttoJS