fusionjs / fusion-plugin-rpc-redux-react

Migrated to https://github.com/fusionjs/fusionjs
MIT License
4 stars 17 forks source link

React-Redux 6.0.0 package breaks dispatch #166

Closed vjocw closed 5 years ago

vjocw commented 5 years ago

Type of issue

bug

Description

Dispatch gets broken. Maybe something to do with this.context?..

image pasted at 2019-1-8 15-13

Current behavior

store.dispatch does not exist.

Expected behavior

store.dispatch should exist.

Steps to reproduce

  1. install react-redux 6.0.0
  2. run rpc calls

Your environment

vjocw commented 5 years ago

going down to v5.x.x fixed this issue.

kahwee commented 5 years ago

I can confirm this as well. Can we set react-redux as a peerDependency and set it to ^v5.0.0 until this gets resolved?

VladimirMilenko commented 5 years ago

Issue is caused due to react-redux using React.createContext. So, workaround is to use v5 unless providers will be implemented using createContext

markerikson commented 5 years ago

Hi, I'm a Redux maintainer.

The real solution here is to update the library to correctly read the store out of the ReactReduxContext instance for compatibility with v6, and release an updated version.

See our docs page here: React-Redux: Accessing the Store.

Choongkyu commented 5 years ago

Does this issue being closed mean that React-Redux >= 6 is good to use with this plugin?

markerikson commented 5 years ago

No, this library is currently only compatible with <= v5, and breaks with >= v6.