Skip to content

Releases: reduxjs/react-redux

v5.0.0-rc.2

13 Dec 06:14
Compare
Choose a tag to compare
v5.0.0-rc.2 Pre-release
Pre-release
npm install --save react-redux@next
# or
yarn add react-redux@next

Sorry about the flip-flopping, but we've removed the previous compatibility option. Another way of working around the issue was discovered that doesn't need configuration and has been implemented for this final release candidate. We should be ready to release a 5.0.0 final version tomorrow.

v5.0.0-rc.1

30 Nov 02:38
Compare
Choose a tag to compare
v5.0.0-rc.1 Pre-release
Pre-release
npm install --save react-redux@next
# or
yarn add react-redux@next

See the 5.0.0-beta.2 release notes if you're new to the 5.0 versions.

The big change for this version is a workaround for a cursor position bug in controlled input fields in React 15 or lower. See #525 for the gory details. There is a workaround in place that defaults to enabled, but will slightly reduce some of the performance gains of 5.0 (it is still faster, just not as fast). The underlying bug will be fixed in React 16 and we will default to disabling our workaround in the next release (scheduled for 5.1.0).

If you have no connected/controlled form inputs in your application, you can turn it off for all connected components like so:

// Before you ReactDOM.render()
import { connect } from 'react-redux'
connect.setDefaultReact15CompatibilityMode(false)

You can also pass a option to connect():

connect(mapStateToProps, mapDispatchToProps, mergeProps, { react15CompatibilityMode: false })

That's it! We should be pushing out a final release this weekend.

Changes

  • Fix error from clear() called during notify() (#517 by @appden)
  • Shows more helpful error when connect() is passed invalid args. (#554 by @jimbolla)
  • Adds react15CompatibilityMode setting (#540 by @jimbolla)

v4.4.6

14 Nov 12:08
Compare
Choose a tag to compare
  • Update React peer dependency to allow React 15.4.0 RC

v5.0.0-beta.3

05 Oct 14:04
Compare
Choose a tag to compare
v5.0.0-beta.3 Pre-release
Pre-release

Changes

  • Remove Warn on Duplicate Props feature. DX needs improvement. (#511)

v5.0.0-beta.2

05 Oct 00:54
Compare
Choose a tag to compare
v5.0.0-beta.2 Pre-release
Pre-release

This is a massive rewrite of React Redux, done mainly by @jimbolla (see #416). There actually will likely be no changes needed to your applications and we encourage you to try this version out in your applications without modification.

TL;DR

  • Backwards compatible API
  • Major internal changes
  • Significant performance improvements in common usage patterns
  • Bugs fixed
  • Additional features added to connect()
  • New connectAdvanced() API
  • What's next?

API Compatibility

Version 5.0 maintains API compatibility with v4.x but due to major internal changes and potential behavior differences across nearly all API surfaces, semver dictates a major version bump. Also, it looks cooler! Store state change notifications sent to components are now guaranteed to occur top-down, so if your code may behave differently if it relied on notifications happening out of order.

Internal Changes

Internally, the code for connect has been rewritten from the ground-up to be more modular, with the intention of greater maintainability and extensibility. This has also led to some new features and performance improvements.

Performance improvements

Significant performance gains were achieved by avoiding extra calls to setState() and render() by ensuring the order of change notifications to occur top-down, matching React's natural flow. Performance tests and benchmarks are discussed in #416.

Bugfixes

Some bugs/issues are resolved, related to performance loss and also impure components not re-rendering.

New features added to connect()

The behavior of connect() is now more customizable, by passing additional properties in the options arg. These will be described in the API docs.

New top level API: connectAdvanced()

The new implementation of connect() splits its behavior such that it is now a wrapper around a more-generalized connectAdvanced(). This connectAdvanced() method can be called directly if you have extreme performance needs or want to craft an API different than that of connect(). This will be described in the API docs.

What's next?

We're looking at removing the shouldComponentUpdate optimization. Since this version is much more performant on its own, that isn't needed. This will fix long-standing problems with other libraries that use React's context API. There are workarounds, but things should work without either library authors having to bend over backwards or React having to make API changes.

We will accept bugfixes on the 4.x branch (which will be created after this version goes final), but new features should be built against the next branch. We love PRs, so keep them coming!

v4.4.5

14 Apr 16:14
Compare
Choose a tag to compare
  • Fixes a regression introduced in 4.4.4 where cleaning up the state in parent’s componentWillUnmount caused an error in child’s mapStateToProps (#351, ea53d6f)

v4.4.4

12 Apr 19:17
Compare
Choose a tag to compare
  • Bail out of calling setState() when mapStateToProps() doesn’t care about ownProps (#348, #300)
  • (Even if it does, you might be able to benefit from this optimization—read #348 for details)

v4.4.3

12 Apr 17:50
Compare
Choose a tag to compare
  • State shape warning now has a more descriptive message (#335, #309)
  • State shape check is now a warning rather than a hard error, and is disabled in production for better performance (90f427b)

v4.4.2

08 Apr 23:19
Compare
Choose a tag to compare
  • Custom mergeProps now works correctly with components that have pure: false (#337, #338)

v4.4.1

13 Mar 00:10
Compare
Choose a tag to compare
  • React v15 is now allowed as a peer dependency (#317, #319)