2.0.0 • Published 2 months ago

@rcp/use.fetcher v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

@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