* feat: use DvaModel instead of redundant types such as kAModelType * feat: set the type for registerServer * feat: remove loading from model
12 lines
424 B
TypeScript
12 lines
424 B
TypeScript
import { getOneNamespaceEffectsLoading } from '@/utils/stroreUtil';
|
|
import { useSelector } from 'umi';
|
|
|
|
// Get the loading status of given effects under a certain namespace
|
|
export const useOneNamespaceEffectsLoading = (
|
|
namespace: string,
|
|
effectNames: Array<string>,
|
|
) => {
|
|
const effects = useSelector((state: any) => state.loading.effects);
|
|
return getOneNamespaceEffectsLoading(namespace, effects, effectNames);
|
|
};
|