27f346d8f1
It was not meant to be used for these cases -- wasting resources creating and going through the cache for each simple direct access.
10 lines
327 B
JavaScript
10 lines
327 B
JavaScript
import { createSelector } from 'reselect';
|
|
|
|
const selectState = (state) => state.web || {};
|
|
|
|
export const selectCurrentUploads = (state) => selectState(state).currentUploads;
|
|
|
|
export const selectUploadCount = createSelector(
|
|
selectCurrentUploads,
|
|
(currentUploads) => currentUploads && Object.keys(currentUploads).length
|
|
);
|