import { getResources } from 'redux-resource';
import store from './store';
const state = store.getState();
// Retrieve resources by an array of IDs
const someBooks = getResources(state.books, [1, 12, 23]);
// Retrieve those same resources as an object
const someBooksAsObject = getResources(state.books, [1, 12, 23], { byId: true });
// Retrieve resources by a list name
const popularBooks = getResources(state.books, 'mostPopular');
// Retrieve the "selected" resources
const selectedBooks = getResources(state.books, (resource, meta) => meta.selected);
const allResources = getResources(state.books);