GitHub

DaffOperationStateSelectors

Selectors for an operation state.

API

interface DaffOperationStateSelectors<TRootState, TState extends DaffOperationState = DaffOperationState> {
  selectLoadingState: MemoizedSelector<TRootState, TState['daffState']>
  selectLoading: MemoizedSelector<TRootState, boolean>
  selectResolving: MemoizedSelector<TRootState, boolean>
  selectMutating: MemoizedSelector<TRootState, boolean>
  selectErrors: MemoizedSelector<TRootState, TState['daffErrors']>
  selectHasErrors: MemoizedSelector<TRootState, boolean>
}

Properties

Name Type Description
selectLoadingState MemoizedSelector<TRootState, TState['daffState']> Selects the loading state enum.
selectLoading MemoizedSelector<TRootState, boolean> Selects whether the operation state is in any of the loading states.
selectResolving MemoizedSelector<TRootState, boolean> Selects whether the operation state is resolving.
selectMutating MemoizedSelector<TRootState, boolean> Selects whether the operation state is mutating.
selectErrors MemoizedSelector<TRootState, TState['daffErrors']> Selects the errors in the operation state.
selectHasErrors MemoizedSelector<TRootState, boolean> Selects whether the operation state has any errors. If so, it should be considered to be in an "error" state.