Material-table: breaking change with react-redux@^6.0.0 / ^7.0.0

Created on 4 May 2019  路  8Comments  路  Source: mbrn/material-table

Describe the bug
Error message on import of 'material-table' along with react-redux@^6.0.0 or react-redux@^7.0.0:

Uncaught Invariant Violation: storeKey has been removed and does not do anything. To use a custom Redux store for specific components, create a custom React context with React.createContext(), and pass the context object to React Redux's Provider and specific components like: <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. You may also pass a {context : MyContext} option to connect

Please see attached log files:
localhost-1556949549615.log

This seems to be stemming from the breaking change #2 noted here.

To Reproduce
Steps to reproduce the behavior:

  1. create-react-app
  2. yarn add react
  3. yarn add react-redux
  4. yarn add material-table
  5. add import MaterialTable from 'material-table' to App.js
  6. yarn start

Expected behavior
It should work with react-redux@^6.0.0 :)

Screenshots
image

Versions tried
I get this same error with any of these versions:
[email protected]
[email protected]
[email protected]
[email protected]

Desktop (please complete the following information):

  • OS: Windows Server 2016
  • Browser: Chrome
  • Version: 74
bug

Most helpful comment

@mbrn and @john-pc seems this _was_ already addressed over at react-beautiful-dnd

Simply remove your own react-redux dependency and all will be well.

All 8 comments

Hi @ejerry ,

Actually react-beautiful-dnd uses redux. But i will look at this case asap.

Thank you very much @mbrn for the fast review! This is a great component.

woops I missed the react-beautiful-error line @mbrn, I will post an issue there.

Perhaps it can be excluded if there are no DND configurations required?

Perhaps it can be excluded if there are no DND configurations required?

I can try it.

@mbrn any update ? my app crashes because of dnd feature

Hi @john-pc ,

Why does it crash?

@mbrn and @john-pc seems this _was_ already addressed over at react-beautiful-dnd

Simply remove your own react-redux dependency and all will be well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

revskill10 picture revskill10  路  3Comments

lazeebee picture lazeebee  路  3Comments

Likurg2010 picture Likurg2010  路  3Comments

balibou picture balibou  路  3Comments

diegosps picture diegosps  路  3Comments