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

Suggestion: Reorganization of Middleware Logic and Structure #3021

Closed
isocroft opened this issue Jun 7, 2018 · 1 comment
Closed

Suggestion: Reorganization of Middleware Logic and Structure #3021

isocroft opened this issue Jun 7, 2018 · 1 comment

Comments

@isocroft
Copy link

isocroft commented Jun 7, 2018

Midlewares work great already in Redux.

However, as pertains this issue we all discover that there are edge cases to the way it is works as implemented via nested closures (2 of them). I do understand why this is necessary owing to the way Redux works. However, this level of composed functions does unsettle some devs who would like to use Redux extensively and i was wondering if the code structure and logic (applying the middleware as some sort of decorator around the store.dispatch method) can be reorganized a bit to look like the middleware implementation in this project.

Here is the Radixx README file which contains example code.

This is just a suggestion... any takers ?

@markerikson
Copy link
Contributor

If you're proposing that we change the middleware signature to be a single function with multiple args instead of the current nested/curried function structure, then no, we're not going to change that. See the "Design Decisions" FAQ entry on why middleware are written as curried functions for links to prior discussion.

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

No branches or pull requests

2 participants