Skip to content

Files

Latest commit

Feb 27, 2024
2ccde6b · Feb 27, 2024

History

History

use.fetcher

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Feb 27, 2024
Sep 26, 2021
Dec 28, 2021
Feb 27, 2024
Sep 26, 2021
Feb 27, 2024
Feb 27, 2024
Feb 27, 2024
Feb 27, 2024
Sep 26, 2021
Feb 27, 2024
Feb 27, 2024
Feb 27, 2024
Feb 27, 2024
Feb 27, 2024
Feb 27, 2024

README.md

@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