Skip to content

middlewareAPI dispatch #2068

@derjoker

Description

@derjoker

https://github.com/reactjs/redux/blob/master/src/applyMiddleware.js#L27

hi, I don't understand here, what's the difference between function (action) => dispatch(action) and function dispatch. They both accept action and return whatever comes from dispatch, right? Can we just write as following? Thanks.

var middlewareAPI = {
  getState: store.getState,
  dispatch: dispatch
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions