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 🚀 #22

Merged
merged 1 commit into from
Oct 15, 2015

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 9 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

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 ⚡

CrocoDillon added a commit that referenced this pull request Oct 15, 2015
@CrocoDillon CrocoDillon merged commit a245318 into master Oct 15, 2015
@CrocoDillon CrocoDillon deleted the greenkeeper-react-redux-4.0.0 branch October 15, 2015 18:08
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