addons-code-manager
addons-code-manager copied to clipboard
Upgrade to react-redux 7
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
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?