Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add postfetch option #31

Merged
merged 5 commits into from
Dec 17, 2015
Merged

Add postfetch option #31

merged 5 commits into from
Dec 17, 2015

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