Packages

react-redux

9.3.1 · 27 Oct 2026MIT54.9M / weekRepositorynpmAtom feed

Your version

0.6.0

8 Aug 2015Where it was published

0.9.0 is the newest release of 0.6.x.

npm marks 0.6.0 as deprecated: This release breaks React Native, please consider updating.

Release note

This release should make your connect()ed components render faster.

Breaking Changes

The components generated by connect() no longer redraw if you deeply mutate their props. Redux embraces immutability, and deep mutations of state never caused redraws anyway, so it's reasonable to fully embrace it, and do the same for props.

Now this:

handleClick() {
  this.state.obj.something = 'changed';
  this.setState({ obj: this.state.obj });
}

render() {
  return <ConnectedComponent obj={this.state.obj} />
}

will not redraw if ConnectedComponent is something you got from React Redux's connect().

If you use this pattern in your code, change it to always create new objects:

handleClick() {
  this.setState({ obj: Object.assign({}, this.state.obj, { something: 'changed' }) });
}

render() {
  return <ConnectedComponent obj={this.state.obj} />
}

Why

This lets us be very efficient with state updates. Even if you supply a custom mergeProps function, we'll only update the connected component if the object it returns is shallowly unequal to the stored one.