Skip to content

Latest commit

 

History

History
41 lines (24 loc) · 661 Bytes

File metadata and controls

41 lines (24 loc) · 661 Bytes

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