Skip to content

Instantly share code, notes, and snippets.

@mvbattan
Created November 28, 2018 21:06
Show Gist options
  • Save mvbattan/499f1c753c209f7c5be3c847e80288ef to your computer and use it in GitHub Desktop.
Save mvbattan/499f1c753c209f7c5be3c847e80288ef to your computer and use it in GitHub Desktop.
Dispatcheable Service
import { wrapService } from 'redux-recompose';
import api from '../config/api';
const service = {
getMatches: () => api.get('/matches'),
getPitches: ({ id }) => api.get('/pitches', { id }),
};
export default wrapService(service, 'soccer');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment