react-cache-request
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

react-cache-request

一个使用axios进行网络请求的hook函数,具备内存,磁盘缓存功能。支持react,react-native

Getting Started

Install

$ yarn add react-cache-request axios

Usage

Import

import {useRequest} from 'react-cache-request';

Simple use

 const {data, status, error} = useRequest({url: 'https://cnodejs.org/api/v1/topics'})

Docs

文档

Example

项目中有react和react-native的示例

Issue

觉得不错的小手一点,给个star,有遇到什么bug或者有什么建议的欢迎提issue

License

MIT

Package Sidebar

Install

npm i react-cache-request

Weekly Downloads

1

Version

0.3.0

License

ISC

Unpacked Size

46.2 kB

Total Files

16

Last publish

Collaborators

  • xiegq