Giter VIP home page Giter VIP logo

zhuomingliang / vue-request Goto Github PK

View Code? Open in Web Editor NEW

This project forked from attojs/vue-request

0.0 2.0 0.0 2.1 MB

⚡️ Vue 3 composition API for data fetching, supports SWR, polling, error retry, cache request, pagination, etc. ⚡️ 一个能轻松帮你管理请求状态(支持SWR,轮询,错误重试,缓存,分页等)的 Vue 3 请求库

Home Page: https://www.attojs.org

License: MIT License

JavaScript 2.13% HTML 0.22% TypeScript 97.66%

vue-request's Introduction

English | 简体中文

VueRequest logo

VueRequest

⚡️ Vue 3 composition API for data fetching, supports SWR, polling, error retry, cache request, pagination, etc.

Coverage Status Size Version Languages License Star Download

Features

  • 🚀 All data is reactive
  • 🔄 Interval polling
  • 🤖 Automatic error retry
  • 🗄 Built-in cache
  • 📠 Written in TypeScript
  • 🍃 Lightweight
  • 📦 Out of the box
  • 🔥 Interactive docs

Documentation

Install

npm install vue-request

# or with yarn
yarn add vue-request

CDN

<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

Thanks

Thank them for inspiring us.

License

MIT License © 2020-present AttoJS

vue-request's People

Contributors

benny-eu avatar dependabot[bot] avatar duncan-zjp avatar john60676 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.