material-components / material-components-web-react

Material Components for React (MDC React)
MIT License
2.02k stars 227 forks source link

React version conflict #1072

Open sheptang opened 3 years ago

sheptang commented 3 years ago

Peer dependencies conflict with main React for the latest version. This causes problems on Server Side Rendering with ExpressJS.

Workarounds such as installing them anyways with --legacy-peer-deps or including those peer dependencies on React's package.json separately as "peerDependencies": { "react": "16.4.2", "react-dom": "16.4.2" }, do not solve the conflict issues for SSR practices.

Screenshot from 2021-07-20 08-32-01

Notice the 3rd article on the console output. As all of the hooks on React work just fine, it seems to me that it's a version conflict issue. Screenshot from 2021-07-20 08-38-12