mozilla / addons-code-manager

A web application to manage add-on source code
Mozilla Public License 2.0
28 stars 36 forks source link

Upgrade to react-redux 7 #58

Open kumar303 opened 5 years ago

kumar303 commented 5 years ago

When adding redux (https://github.com/mozilla/addons-code-manager/issues/6) I had to use react-redux at 5.1.1 because Enzyme does not yet support the createContext API (https://github.com/airbnb/enzyme/issues/1958). Once that's supported, we can upgrade react-redux to 6.0.0.

To be more specific, I could not figure out how to shallow render a component wrapped in Redux's connect() with react-redux 6.0.0. I kept ending up with something like <ContextConsumer>[function bound to wrappedRender]</ContextConsumer>. It was possible to use mount() but that caused complications with matching the modular CSS class names.


Update from April 2019: we should target v7 now, but this is not easier...

┆Issue is synchronized with this Jira Task

willdurand commented 5 years ago

We should subscribe to this issue: https://github.com/reduxjs/react-redux/issues/1161

bobsilverberg commented 5 years ago

After scanning through the issues both for Redux and for Enzyme, it sounds like we need a fix for one or the other but not necessarily both. Is that correct? The Enzyme issue doesn't even state any plans they have to support the context API, which is a bit disappointing.

So at this point we're just waiting to see who, if anyone, implements a fix for this?