Closed langpavel closed 5 years ago
In our app we made a StoreContext.react.js
component that applies both the react-redux
provider and the redux-react-hook
provider, and just use that everywhere. As you pointed out, the shapes are not the same, so this won't really work.
Related to #3
Edit: This will not work because
react-redux
injects state butredux-react-hooks
injects store into ContextIfredux
is same, then reusing context should be as easy as injecting foreign context object:https://github.com/facebookincubator/redux-react-hook/blob/3a86bc02ca81def12e0240c986d56ee1da5fc792/src/create.ts#L21-L30
new code (will not work)
```ts export function create< TState, TAction extends Action, TStore extends StoreThis may break if context shapes from
react-redux
andredux-react-hook
are different — they are different