1.0.1 • Published 2 years ago
react-hooks-extra v1.0.1
react-hooks-extra
react hooks
Install
npm install --save react-hooks-extra
Usage
import * as React from 'react'
import { useLoadHook } from 'react-hooks-extra'
const Example = () => {
const { loading, txt, setLoading } = useLoadHook()
const onLoading = () => {
setLoading({
loading: true,
txt: '事件处理中'
})
}
return (
<div>
{loading && <h1>333</h1>}
<button onClick={() => onLoading()}></button>
</div>
)
}
License
MIT © jecksonli
This hook is created using create-react-hook.