Description
What is the current behavior?
The Provider
component allows consumers to pass a custom context
, but the current hooks API does not allow that custom context to be used.
What is the expected behavior?
I'd like to be able to access a custom context via React Redux hooks. I'd expect this would be implemented with a "hook factory" pattern for performance reasons, but that's an implementation detail.
Which versions of React, ReactDOM/React Native, Redux, and React Redux are you using? Which browser and OS are affected by this issue? Did this work in previous versions of React Redux?
This issue is unique to the v7-hooks
branch. I suppose you could say this has never worked in previous versions of React Redux, since hook support is new 🙂or, it might be argued that the HOC pattern was able to access alternate contexts, so hook support would be incomplete without it.
Note: I have a PR prepared; I didn't read the contributing guidelines until after I'd written the code, which is why I'm doubling back and creating the discussion issue now.