1 Answers

12
votes

createStoreWithMiddleware is the old way to create the store with enhancers in Redux. In Redux version 3.1.0, a new approach has been introduced and now createStore receives an enhancer such as applyMiddleware() as the last optional argument.

Now, the new createStore approach is preferable as it leads to code that is easier to read and reason about, but both will work.