Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

[Depsy] Upgrade dependency react-redux to 4.0.0 #84

Closed
wants to merge 1 commit into from

Conversation

doppins-bot
Copy link
Contributor

Hi!

A new version was just released of react-redux, so Depsy
has upgraded your project's dependency ranges.

Make sure that it doesn't break anything, and happy merging! :shipit:


Upgraded react-redux to 4.0.0

Changelog:

Version 4.0.0

Breaking Changes

React 0.14 is now required and a peer dependency

If you need 0.13 support, keep using 3.x. In addition, React has now been promoted to be a peer dependency because you’ll use the same react package for web and native.

react-redux/native entry point has been removed

Track this React Native issue and wait until RN works on top of React 0.14. Then React Redux 4.x should “just work” in React Native. Until then, you need to keep using 3.x with React Native.

<Provider> no longer accepts a function child

This resolves a ton of router-related issues and also helps beginners understand what's going on.

Before

React.render(
  <Provider>
    {() => <App />}
  </Provider>,
  rootEl
);

After

ReactDOM.render(
  <Provider>
    <App />
  </Provider>,
  rootEl
);

Refs are now opt-in

connect() no longer provides a ref to the wrapped component by default. You need to specify withRef: true in the options as the fourth argument to connect() to get the old behavior. getWrappedInstance() will throw unless you do that.

This fixes reduxjs/react-redux#141.

Before

class MyComponent extends Component { ... }
MyComponent = connect(mapStateToProps)(MyComponent);

// later
let instance = React.render(<MyComponent />, targetEl);
console.log(instance.getWrappedInstance());

After

class MyComponent extends Component { ... }
MyComponent = connect(mapStateToProps, null, null, { withRef: true })(MyComponent);

// later
let instance = ReactDOM.render(<MyComponent />, targetEl);
console.log(instance.getWrappedInstance());

Version 3.1.0

@ekmartin ekmartin closed this Oct 16, 2015
@ekmartin ekmartin deleted the depsy-react-redux-15_10_15_12_27_08 branch October 16, 2015 22:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants