Open kumar303 opened 5 years ago
We should subscribe to this issue: https://github.com/reduxjs/react-redux/issues/1161
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?
When adding
redux
(https://github.com/mozilla/addons-code-manager/issues/6) I had to usereact-redux
at5.1.1
because Enzyme does not yet support thecreateContext
API (https://github.com/airbnb/enzyme/issues/1958). Once that's supported, we can upgradereact-redux
to6.0.0
.To be more specific, I could not figure out how to shallow render a component wrapped in Redux's
connect()
withreact-redux
6.0.0
. I kept ending up with something like<ContextConsumer>[function bound to wrappedRender]</ContextConsumer>
. It was possible to usemount()
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