0.0.1 • Published 4 years ago

@amiright/hooks v0.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

@amiright/hooks

npm version install size npm downloads

Install with npm

npm install --save @amiright/hooks

useRequest

A React hook used to send request

Usage

import { useRequest } from '@amiright/hooks'

am4core.useTheme(am4themes_animated)

const App = () => {
  /**
   * 
   * @param {Object} config Axios config
   */
  const { loading, status, data, error } = useRequest({ 
    method: 'get',
    url: 'YOU_API_ENDPOINT'
  })
  console.log(loading, status, data, error)
 
  ...
}
0.0.1

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago