-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Export default middlewares and use consistent naming #79
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
Conversation
I'd rather not export “middlewares” because it leaves the impression that Redux plans to include many different middlewares (when in fact the opposite is true: we only ship with I agree about On a sidenote, would |
👍 for renaming to |
If we do that, let's change “middlewares” parameter name inside |
I think the 's' is useful there to clarify that it's an array, not a single middleware. |
Good point. Let's do this then:
|
Since there will be only one default middleware, how about just exporting it as The only reason for exporting it is to avoid doing |
I don't think |
Also I don't like |
Right...I don't know, I'm just trying to make it easier to just re-use this middleware instead of copy-paste it. How about instead having a |
But then you'd need
I think it's easy enough to be honest. You either need |
Ok, let's keep it like this for now. If there is actually a need we can re-discuss it. Should I just do the renaming then? |
Yeah, please do! |
5e63d83
to
dcc9b97
Compare
@gaearon done, I also squashed the commits. |
Damn it, there is a typo...1sec |
dcc9b97
to
3d21465
Compare
Now it should be ok |
Export default middlewares and use consistent naming
👍 thanks! |
To be consistent with e.g.:
composeStores
.Also exporting the default
thunk
middleware is useful if I need to create a dispatcher with other middlewares, for example:Does it make sense?