redux-effects-fetchr
fetchr binding for redux-effects family.
Installation
npm install --save redux-effects-fetchr
Usage
Installing the middleware:
;;;;; const fetchr = xhrPath: '/api'; const store = ;
Defining action creators:
;;; const fetchUserRequest = ;const fetchUserSuccess = ;const fetchUserFail = ; { return ;}
Using it:
const promise = store;
API (Action Creators)
fetchrCreate(resource, params = {}, body = {}, config = {})
fetchrCreate({ resource, params = {}, body = {}, config = {} })
Call the create method of a service. See fetchr API docs for more info.
fetchrDelete(resource, params = {}, config = {})
fetchrDelete({ resource, params = {}, config = {} })
Call the delete method of a service. See fetchr API docs for more info.
fetchrRead(resource, params = {}, config = {})
fetchrRead({ resource, params = {}, config = {} })
Call the read method of a service. See fetchr API docs for more info.
fetchrUpdate(resource, params = {}, body = {}, config = {})
fetchrUpdate({ resource, params = {}, body = {}, config = {} })
Call the update method of a service. See fetchr API docs for more info.