Skip to content

Latest commit

 

History

History

use.fetcher

@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