Hook useLoader
Arguments
Arguments | Type | Meaning | Possible values |
---|---|---|---|
status | boolean | Ser loaders default status | true / false |
Return
Element | Type | Meaning |
---|---|---|
loaderStatus | boolean | Loader status |
loaderElement | node | Loader component. Can be use in JSX |
setLoader | function | Change loaders status Function |
setLoader(newStatus)
Arguments | Type |
---|---|
newStatus | boolean |
Example
const { loaderStatus, loaderElement, setLoader } = useLoader(false)