2.0.0 • Published 2 months ago
@rcp/use.fetcher v2.0.0
@rcp/use.fetcher
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