v1.0.0-alpha
Pre-release
Pre-release
NOTE: THIS IS A PRE-RELEASE WITH SOME BREAKING CHANGES.
THE README IS NOT UPDATED TO ITS API, SEE EXAMPLES AND TESTS INSTEAD.
Compatible example code: https://github.com/gaearon/redux/tree/v1.0.0-alpha/examples
Compatible test code: https://github.com/gaearon/redux/tree/v1.0.0-alpha/test
Full diff (includes changes to the examples, tests and implementation):
https://github.com/rackt/redux/compare/v0.12.0...v1.0.0-alpha?diff=unified
Naming
- “Stateless Stores” are now called reducers. (#137 (comment))
- The “Redux instance” is now called “The Store”. (#137 (comment))
- The dispatcher is removed completely. (#166 (comment))
API changes
is nowcomposeStores
composeReducers
.is gone.createDispatcher
is nowcreateRedux
createStore
.<Provider>
now acceptsstore
prop instead of.redux
- The new
createStore
signature iscreateStore(reducer: Function | Object, initialState: any, middlewares: Array | ({ getState, dispatch }) => Array)
. - If the first argument to
createStore
is an object,composeReducers
is automatically applied to it. - The “smart” middleware signature changed. It now accepts an object instead of a single
getState
function. Thedispatch
function lets you “recurse” the middleware chain and is useful for async: #113 (comment).
Correctness changes
- The
dispatch
provided by the default thunk middleware now walks the whole middleware chain. - It is enforced now that raw Actions at the end of the middleware chain have to be plain objects.
- Nested dispatches are now handled gracefully. (#110, #119)
Internal changes
- The object in React context is renamed from
toredux
store
. - Some tests are rewritten for clarity, focus and edge cases.
- Redux in examples is now aliased to the source code for easier work on master.