Skip to content

v1.0.0-alpha

Pre-release
Pre-release
Compare
Choose a tag to compare
@gaearon gaearon released this 30 Jun 21:58
· 3699 commits to master since this 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

API changes

  • composeStores is now composeReducers.
  • createDispatcher is gone.
  • createRedux is now createStore.
  • <Provider> now accepts store prop instead of redux.
  • The new createStore signature is createStore(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. The dispatch 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 redux to 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.