redux v4.0.0 Release Notes
Release Date: 2018-04-17 // about 6 years ago-
๐ฑ Redux 4 is here! ๐
If you're a React user, this is going to be a lot like going from 15 to 16. Not a lot of user-facing changes, but some interesting improvements under the hood.
๐ The major changes (#1342) are around our TypeScript definitions, bundled CommonJS and ES builds, throwing if you subscribe or getState from a reducer, and a bunch of other smaller things. The full changes are listed below.
Enjoy!
Changes
- โก๏ธ Tons of docs updates. Thanks @markerikson and the Redux community for all your PRs!
- ๐ Make middleware API dispatch pass through all call arguments (#2560 by @Asvarox)
- ๐จ Refactor applyMiddleware to reduce confusion around createStore args (#2201 by @jimbolla)
- ๐ Make bindActionCreators transparently pass
this
(#2641 by @Parakleta) - โ Remove @Private flag on AnyAction type definition (#2510 by @alexmngn)
- ๐ Fixed quote types inconsistency in a warning message (#2297 by @Andarist)
- ๐ Move ActionTypes to a private export (b62248b by @timdorr)
- Throw if getState, subscribe, or unsubscribe called while dispatching (including inside a reducer) (#1569 by @mjw56)
- Warn when dispatching during Middleware setup (#1485 by @timdorr)
- Mapped type for combineReducers in index.d.ts (#2182 by @mkusher)
- โ Remove legacy jsnext entry (#2284 by @TrySound)
- Revamp TypeScript typing with more type safety (#2563 by @pelotom)
- ๐ Fix TS definitions test for new Dispatch typing (#2674 by @pelotom)
- โ Add DeepPartial type for preloaded state (#2679 by @aikoven)
- Bundle cjs and es formats (#2358 by @TrySound)
- REPLACE action for replaceReducers (#2673 by @timdorr)
- โก๏ธ Update build to use babel-preset-env (#2696 by @hmillison)
- โก๏ธ Optimize dispatch plain object check (#2599 by @timdorr)
- โก๏ธ Update TypeScript typings (#2773 by @aikoven)
- โ Added prettier formatting (#2676 by @adityavohra7)
- โ Add a sideEffects: false flag for Webpack 4 (#2865 by @timdorr)
- ๐ Fix missed case in "observe" type check (#2919 by @zerobias)