Files
financial-admin/packages/hooks/src/use-loading.ts
2025-12-16 20:20:53 +07:00

17 lines
311 B
TypeScript

import useBoolean from './use-boolean';
/**
* Loading
*
* @param initValue Init value
*/
export default function useLoading(initValue = false) {
const { bool: loading, setTrue: startLoading, setFalse: endLoading } = useBoolean(initValue);
return {
loading,
startLoading,
endLoading
};
}