import { createSelector } from 'reselect' ; import { RootState } from '../store' ; const conversations = ( state ) => state . conversations ; const currentID = ( _ , { ID } ) => ID ; export const conversationByID = createSelector ( [ conversations , currentID ] , ( conversations , currentID ) => conversations [ currentID ] ) ; export const allConversations = createSelector ( [ conversations ] , ( conversations ) => { return Object . values ( conversations ) ; } ) ;