Skip to main content

Hook useLoader

Arguments

ArgumentsTypeMeaningPossible values
statusbooleanSer loaders default statustrue / false



Return

ElementTypeMeaning
loaderStatusbooleanLoader status
loaderElementnodeLoader component. Can be use in JSX
setLoaderfunctionChange loaders status Function

setLoader(newStatus)

ArgumentsType
newStatusboolean



Example

const { loaderStatus, loaderElement, setLoader } = useLoader(false)