@rcp/use.fetcher
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

@rcp/use.fetcher

NPM version NPM Downloads

async data fetcher

Installation

npm install @rcp/use.fetcher
# or use yarn
yarn add @rcp/use.fetcher

Usage

import useFetcher from '@rcp/use.fetcher'

function App() {
  const [val, setVal, { loading, error }] = useFetcher(() => getAppData(), {}, [])
}

API

Related

Authors

This library is written and maintained by 余聪, yucong@yuanfudao.com.

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    5
    • latest

Version History

Package Sidebar

Install

npm i @rcp/use.fetcher

Weekly Downloads

6

Version

2.0.0

License

MIT

Unpacked Size

104 kB

Total Files

42

Last publish

Collaborators

  • moyuyc