mui/material-ui

Incompatibility with react@16.0.0-alpha.6

Closed this issue · 5 comments

Problem description

Doesn't work with react@16.0.0-alpha.6.

Link to minimal working code that reproduces the issue

Just an update of react is enough to reproduce this.

Versions

  • Material-UI:1.0.0-alpha.10
  • React:16.0.0-alpha.6
  • Browser:All

Description

Seems material ui relies on "react-event-listener": "^0.4.2", which in turn depends on "react-addons-shallow-compare" which is not compatible with the react@16.0.0-alpha.6.
I know react's version is alpha but the file react-addons-shallow-compare is referring to (shallowCompare) is likely gone forever so this wont change when the stable version comes out.

Images & references

That's the exact error message I see: Module not found: Error: Cannot resolve module 'react/lib/shallowCompare' in /pathToProject/node_modules/react-addons-shallow-compare
@ ./~/react-addons-shallow-compare/index.js 1:17-52

Thanks for raising that issue, I'm gonna take care of react-event-listener.

I have published a new version, would you mind trying again?

That did it, thanks a lot for such a quick fix!
Btw I just noticed same issue with react-addons-transition-group (material-ui@0.17.1 this time).
Seems it is referenced in eg Dialog.js.
Module not found: Error: Cannot resolve module 'react/lib/ReactTransitionGroup' in /pathToProject/node_modules/react-addons-transition-group

I'm glad it's working out. Thanks for trying out the next react release. Do you want to fix the master version? I do longer plan any work on the master branch, still, we accept bug fixes.

Yep, let's fix the master, thanks.