export const getTotalUnreadCount = createSelector(
// dependencies
({ state }) => state.messages.sessions,
({ state }) => state.messages.selectedSession,
({ state }) => state.messages.muted,
({ state }) => state.messages.unreadCounts,
({ state }) => state.onlineStatus.onlineStatus,
({ state }) => state.notification.settings,
// heavy computation
(sessions, selectedSession, muted, ...) => {
return calculateTotalUnreadCount( ... );
}
);