Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update react-redux to version 4.0.0 🚀 #5

Closed
wants to merge 1 commit into from

Conversation

greenkeeperio-bot
Copy link
Contributor

Hello 👋

🚀🚀🚀

react-redux just published its new version 4.0.0, which is not covered by your current version range.

If this pull request passes your tests you can publish your software with the latest version of react-redux – otherwise use this branch to work on adaptions and fixes.

Happy fixing and merging 🌴


GitHub Release

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 #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());


The new version differs by 23 commits .

  • fdbc579 4.0.0
  • 084cedb Merge pull request #71 from rackt/drop-react-0.13-support
  • 11dee1f Update the docs for React 0.14
  • 2d3d0be Make refs opt-in. Fixes #141
  • c54ffd9 Drop support for React 0.13
  • 69de34f Merge pull request #153 from epeli/warnfix2
  • 84f1372 Fix React.findDOMNode warning
  • 3f90174 Merge pull request #147 from standup75/master
  • 0518631 Changed mapStateToProp to mapDispatchToProps in API docs
  • f9dfe46 3.1.0
  • f7c9ac1 Style tweaks
  • 441c359 Merge pull request #135 from mattydoincode/master
  • ef14a40 Fixes CI
  • e2c7746 Merge pull request #134 from djkirby/patch-1
  • 251043d :memo: Fix typo in docs

There are 23 commits in total. See the full diff.


This pull request was created by greenkeeper.io.
It keeps your software, up to date, all the time.

Tired of seeing this sponsor message? Upgrade to the supporter plan! You'll also get your pull requests faster ⚡

@frankwallis frankwallis closed this Nov 9, 2015
@frankwallis frankwallis deleted the greenkeeper-react-redux-4.0.0 branch November 9, 2015 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Connect's wrapped component can't be a stateless function
2 participants