use-cat-api
v1.0.0
Published
React hook to fetch data from cat-api
Downloads
2
Readme
use-cat-api
React hook to fetch data from the cat-api
Install
npm install --save use-cat-api
Usage
import React from 'react'
import { useCatApi } from 'use-cat-api'
const App = () => {
const {loading, data} = useCatApi()
if (loading) {
return (
<div>
{loading}
</div>
)
} else {
return (
<div>
{JSON.stringify(data)}
</div>
)
}
}
export default App
License
MIT © berzerk-interactive
This hook is created using create-react-hook.