create-api-hooks
v0.0.50
Published
>
Downloads
41
Readme
create-api-hooks
Install
npm install --save create-api-hooks
or
yarn add create-api-hooks
Usage
import React form 'react'
import createApiHooks from 'create-api-hooks'
const useApi = () => createApiHooks(axios.get('/data'))
const App = () => {
const {data} = useApi()
console.log(data)
}
License
MIT © mushan0x0