-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Description
I was checking out the source code for https://github.com/reactjs/redux/blob/master/src/applyMiddleware.js#L20 and https://github.com/reactjs/redux/blob/master/src/createStore.js#L50 and noticed one thing:
// createStore.js
return enhancer(createStore)(reducer, preloadedState);
// applyMiddleware.js
return (createStore) => (reducer, preloadedState, enhancer) => {So as far as I understood, applyMiddleware's (and any store enhancer's) signature is (createStore) => createStore, while createStore is assuming (createStore) => (reducer, preloadedState).
Which one should be the correct one? I would assume (createStore) => createStore.
Metadata
Metadata
Assignees
Labels
No labels