Closed alanwei0 closed 7 years ago
@alanwei0 : Because applyMiddleware
is a store enhancer. It's just the only one that ships with Redux, but other than that there's nothing "special" about it. It's also possible that there might be some scenario where you might want to put another enhancer first (although I'm not sure of a specific example right now).
in the docs of redux
if
applyMiddleware
must go before other enhancers, why not change the api ofcreateStore
, for example:then, users don't need to care about the order between
applyMiddleware
and other enhancers