import { setResourceMeta } from 'redux-resource';
import myActionTypes from './my-action-types';
export default function(resourceType, options) {
return function(state, action) {
// Ignore actions that were dispatched for another resource type
if (action.resourceType !== resourceType) {
if (action.type === myActionTypes.SELECT_RESOURCES) {
resources: action.resources,
initialResourceMeta: options.initialResourceMeta
} else if (action.type === myActionTypes.UNSELECT_RESOURCES) {
resources: action.resources,
initialResourceMeta: options.initialResourceMeta