Skip to content

middleware - Why currying rather than (store, action, next) ->  #534

Closed
@phzbox

Description

@phzbox

Hi, the new docs are great. One question I had while reading the whole middleware section is why does the middleware has to be curried? Why not simply:

var store = <..>;
store.addMiddleware(function(store, action, next) {
  var result = next();
  // whatever
});

Maybe a quick point explaining in the doc would be helpful.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions