addons-code-manager icon indicating copy to clipboard operation
addons-code-manager copied to clipboard

Upgrade to react-redux 7

Open kumar303 opened this issue 6 years ago • 2 comments

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

kumar303 avatar Jan 23 '19 20:01 kumar303

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

willdurand avatar Jan 24 '19 08:01 willdurand

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?

bobsilverberg avatar Jan 28 '19 17:01 bobsilverberg