Skip to content

Releases: reduxjs/redux

v3.1.5

30 Jan 09:40
Compare
Choose a tag to compare
  • replaceReducer() now throws a meaningful error rather than crashes if argument is not a function (#1318, #1321)

v3.1.4

29 Jan 17:47
Compare
Choose a tag to compare
  • Fixes false positive for the envification check in IE because it doesn’t support Function.name (#1311)

v3.1.3

29 Jan 17:18
Compare
Choose a tag to compare
  • Don’t crash when console or console.error is unavailable (#1311)

v3.1.2

28 Jan 19:56
Compare
Choose a tag to compare
  • Adds loose-envify as a dependency to fix builds for Browserify users. (#1304 & #1306)

v3.1.1

28 Jan 18:50
Compare
Choose a tag to compare
  • Fixes applyMiddleware() to forward the enhancer if you mix the old and the new styles of specifying enhancers—there is no point to doing this though. (#1302)

v3.1.0

28 Jan 18:11
Compare
Choose a tag to compare
  • For Browserify users, Redux should now be properly envified without extra configuration (#1301)
  • createStore() now receives an enhancer such as applyMiddleware() as the last optional argument (#1294)

Wait, what?

You don’t have to change anything. However if you use store enhancers such as applyMiddleware() or Redux DevTools you might like that you can now express the same code in a more JavaScript-friendly way:

- const createStoreWithMiddleware = applyMiddleware(
-   thunk,
-   logger
- )(createStore)
- const store = createStoreWithMiddleware(
-   rootReducer,
-   initialState
- )
+ const store = createStore(
+   rootReducer,
+   initialState,
+   applyMiddleware(thunk, logger)
+ )

For multiple store enhancers you can still use compose() but in a similar more straightforward fashion:

- const finalCreateStore = compose(
-   applyMiddleware(thunk, logger),
-   DevTools.instrument()
- )(createStore)
- const store = finalCreateStore(reducer, initialState)
+ const store = createStore(
+   reducer,
+   initialState,
+   compose(
+     applyMiddleware(thunk, logger),
+     DevTools.instrument()
+   )
+ )

The second initialState argument stays optional so you can skip it when specifying the enhancer.

The old way of doing things still works, too.
We’re just adding a nicer way to apply enhancers, that’s all.

Happy reducing!

v3.0.6

25 Jan 01:37
Compare
Choose a tag to compare
  • compose() now aligns more closely with Underscore/Lodash behavior by allowing multiple arguments to be passed to the last function. This is not changing the existing behavior for the single argument call which has been the only possible use case before. (#632 (comment), #1050)
  • The dev-only state shape sanity check warning in combineReducers() now runs faster. (#1118)
  • Now we warn if you’re running an unenvified build of Redux in production as it is slower. We determine this by checking whether you have uglified Redux code, and if you did, we check that process.env.NODE_ENV polyfill (which we require anyway) is set to 'production'. This does not affect the UMD builds. This is also a warning and not a hard error so it isn't a breaking change. (#1029, #1075)
  • We now officially support importing individual modules from redux/lib/*.js. This is only true for top-level directory—we do not supporting reaching into redux/lib/utils, for example. To support this, we moved all top-level exports to be in redux/lib, for example, redux/lib/applyMiddleware.js. (#1223, #1224)

v3.0.5

12 Dec 17:45
Compare
Choose a tag to compare
  • Removes .babelrc in the compiled package because it is irrelevant (we ship ES5 code) and breaks React Native 0.16 and some consumers who use Babel 6 forgetting to exclude node_modules from transformations. (#1033, #1039, #1127)

v3.0.4

23 Oct 11:50
Compare
Choose a tag to compare
  • Unsubscribing a store listener is now a no-op when called twice instead of a bug (#938, #939, b7031ce)

v3.0.3

21 Oct 22:58
Compare
Choose a tag to compare
  • combineReducers() now returns the same object if none of the child states have changed. (#853, #856)