Skip to content

Conversation

lexich
Copy link
Owner

@lexich lexich commented Dec 17, 2015

  • Add postfetch option - you can organize chain of calling events after the current endpoint will be successful executed
{
  user: "/user/info",
  logout: {
    url: "/user/logout",
    postfetch: [
      function({data, dispatch, getState}) {
        dispatch(actions.user.reset());
      }      
    ]    
  }
}
import reduxApi from "redux-api";
// or
const reduxApi = require("redux-api");
// or
const reduxApi = require("redux-api").default;

lexich added a commit that referenced this pull request Dec 17, 2015
@lexich lexich merged commit d04b678 into master Dec 17, 2015
@lexich lexich deleted the add_postfetch_option branch December 17, 2015 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant