pgarciacamou / react-context-consumer-hoc

HOC that consumes multiple contexts and pass as props to components
MIT License
18 stars 3 forks source link

feat(clean): remove noRef helper because it is no longer needed for react-redux #20

Closed pgarciacamou closed 5 years ago

pgarciacamou commented 5 years ago

Fixes

Checklist

Short description of what this PR does:

There are two solutions to work around this issue with react-redux.

  1. The first and most important is forwardRef option: https://react-redux.js.org/api/connect#forwardref-boolean.
  2. If this is not good enough, then wrapping is the best solution https://github.com/reduxjs/react-redux/issues/914#issuecomment-377421145

Either way, react-redux no longer has an issue with an object being passed as a component, in other words, it works with a component that uses forwardRef() as if you did not pass any references using .noRef(). Which is why I am removing this code.