Skip to content

Releases: reduxjs/react-redux

v4.4.10

14 Mar 12:01
cb1b56e
Compare
Choose a tag to compare
  • Update hoist-non-react-statics to 3.x

v6.0.1

20 Feb 03:58
162b81a
Compare
Choose a tag to compare

This is a minor release with support for react-hot-loader and a few small bug fixes for edge cases.

While you're here, please stop by #1177 to see our roadmap for the next versions of React Redux. We are aware that performance is not so hot in 6.0. Short version: We put too much traffic on React's context API, which isn't really designed for high levels of reads and writes. We're looking to reduce that load and get performance back on track in a minor release, so there won't be backwards compatibility concerns. We have a new extensive benchmark suite to keep us on track and ensure we're not regressing on speed in the future.

And yes, we know about Hooks. Check out #1179.

Changes

v6.0.0

05 Dec 01:02
581ece4
Compare
Choose a tag to compare

🎉 This is our first big release supporting the new Context API added in React 16.4!

As such, we now require React 16.4 or higher. Make sure to update your version when updating to this release.

This work has been mostly lead by @cellog and @markerikson, with special guest appearances by yours truly and a whole cast of helpful reviewers.

Note: If you'd like to know more about the changes in v6, and how the implementation has changed over time, see Mark's post Idiomatic Redux: The History and Implementation of React-Redux.

Breaking Changes

  • The withRef option to connect has been replaced with forwardRef. If {forwardRef : true} has been passed to connect, adding a ref to the connected wrapper component will actually return the instance of the wrapped component.

  • Passing store as a prop to a connected component is no longer supported. Instead, you may pass a custom context={MyContext} prop to both <Provider> and <ConnectedComponent>. You may also pass {context : MyContext} as an option to connect.

Behavior Changes

Any library that attempts to access the store instance out of legacy context will break, because we now put the store state into a <Context.Provider> instead. Examples of this include connected-react-router and react-redux-subspace. (The current implementation does also put the store itself into that same context. While accessing the store in context is not part of our public API, we will still try to make it possible for other libraries to access it, with the understanding that this could break at any time.)

Also, there is a behavior change around dispatching actions in constructors / componentWillMount. Previously, dispatching in a parent component's constructor would cause its children to immediately use the updated state as they mounted, because each component read from the store individually. In version 6, all components read the same current store state value from context, which means the tree will be consistent and not have "tearing". This is an improvement overall, but there may be applications that relied on the existing behavior.

Changes

v6.0.0-beta.3

23 Nov 19:53
f0840f1
Compare
Choose a tag to compare
v6.0.0-beta.3 Pre-release
Pre-release

Changes

  • Treat null as a valid plain object prototype in isPlainObject() (#1075 by @rgrove)
  • Ensure connectAdvanced only re-renders if derived props change (#1079 by @epeli and @markerikson)

v6.0.0-beta.2

23 Nov 19:50
59aaba5
Compare
Choose a tag to compare
v6.0.0-beta.2 Pre-release
Pre-release

Just a small fix to relax the React peer dependency back to 16.4+.

v5.1.1

10 Nov 21:45
5cdb83a
Compare
Choose a tag to compare

Changes

  • Upgrade hoist-non-react-statics to deal with contextType (by @timdorr)
  • Treat null as a valid plain object prototype in isPlainObject() (#1075 by @rgrove)

v6.0.0-beta.1

06 Nov 21:47
7496b91
Compare
Choose a tag to compare
v6.0.0-beta.1 Pre-release
Pre-release

🎉 This is our first big release supporting the new React Context API! No more blocked updates!

As such, we now require React 16.4 or higher. Make sure to update your version when updating to this release.

This work has been mostly lead by @cellog and @markerikson, with special guest appearances by yours truly and a whole cast of helpful reviewers. While we've had a lot of eyes on this refactor, we need more! Please test this out in your applications and let us know if there are big performance or feature regressions.

npm install react-redux@next

Note: 6.0.0-beta.2 is now on npm. This fixes an incorrect peer dependency for React 16.6 in beta.1.

Breaking Changes

Known major breaking changes:

  • The withRef option to connect has been replaced with forwardRef. If {forwardRef : true} has been passed to connect, adding a ref to the connected wrapper component will actually return the instance of the wrapped component. (Known issue: Redux Form currently relies on withRef.)
  • Passing store as a prop to a connected component is no longer supported. Instead, you may pass a custom context={MyContext} prop to both <Provider> and <ConnectedComponent>. You may also pass {context : MyContext} as an option to connect.

Other Behavior Changes

Any library that attempts to access the store instance out of legacy context will break, because we now put the store state into a <Context.Provider> instead. Examples of this include connected-react-router and react-redux-subspace. (The current implementation does also put the store itself into that same context. While accessing the store in context is not part of our public API, we will still try to make it possible for other libraries to access it, with the understanding that this could break at any time.)

Also, there is a behavior change around dispatching actions in constructors / componentWillMount. Previously, dispatching in a parent component's constructor would cause its children to immediately use the updated state as they mounted, because each component read from the store individually. In version 6, all components read the same current store state value from context, which means the tree will be consistent and not have "tearing". This is an improvement overall, but there may be applications that relied on the existing behavior.

Other than those issues, this should be API-compatible with the existing version 5.x line.

Changes

v5.1.0

25 Oct 20:27
b245f83
Compare
Choose a tag to compare

The biggest fix is for connect() being used with React's newer forwardRef, memo, and lazy APIs.

We also have begun a complete rewrite of our docs for React Redux. Check them out! Many thanks to those who contributed: @markerikson, @sveinpg, @wgao19, @BTMPL, @pyliaorachel, @dagstuan, @Kerumen, and @carloluis (sorry if I forgot someone!). Docs are a great way to get started contributing to open source, so open a PR today! Check #1001 to see what else needs to be done.

We're also looking at overhauling Redux's documentation. Check out reduxjs/redux#2590 for the latest there.

Changes

v5.1.0-test.1

21 Jun 20:21
3e53ff9
Compare
Choose a tag to compare
v5.1.0-test.1 Pre-release
Pre-release

This release is broken - DO NOT USE IT!

This is a test release to try out some changes in relation with React 16.3's new StrictMode. Please try it out in your projects and see if it breaks anything!

Narrator: It did.

It turned out to be very broken, and should not be used.

We are currently working on React-Redux version 6.0, which will switch to using createContext internally. See #950 for our development roadmap, and #995 and #1000 for the two "competing" work-in-progress PRs (available on NPM as tags next-995 and next-1000). Please try those out instead, and give us feedback in the PR threads.

Changelog for historical reference

Changes

v4.4.9

21 Mar 16:36
Compare
Choose a tag to compare
  • Update hoist-non-react-statics to 2.x