er-custom-hooks
v0.0.2
Published
M
Downloads
2
Readme
er-custom-hooks
Made with create-react-library
Getting Started
npm install --save er-custom-hooks
Basic Usage
import React, {useEffect} from 'react'
import {useAsync, AsyncWrapper} from 'er-custom-hooks'
import getExampleReasources from 'er-custom-hooks-http'
const Example = () => {
const {executeFunction, status, value} = useAsync(getExampleReasources)
useEffect(() => {
executeFunction()
}, [])
return <AsyncWrapper status={status}>
<div>{value}</div>
</AsyncWrapper>
}
export default Example