Topic: React 17 Compatibility
thehotginburns pro premium asked 4 years ago
Are MDB v5 components compatible with React version 17?
Nates pro premium answered 4 years ago
Nates pro premium answered 4 years ago
Some more info: this is only an issue when using npm7. npm install fails because mdbreact depends on material ui libraries that dont work with react 17. Lower versions of npm allow it. Yarn installs it with warnings.
For it to work in npm7 use either --force or --legacy-peer-deps flags. https://github.blog/2021-02-02-npm-7-is-now-generally-available/#peer-dependencies
I ended up using yarn
Krzysztof Wilk staff answered 4 years ago
Hi!
As you can see in our changelog (https://mdbootstrap.com/docs/react/changelog/#v5-0-0 ) MDB React package was updated to React 17 in the 5.0.0 release. Anyway - our plugins are still working on React 16, but for now - there's no ETA for this :(
Keep coding!
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: Yes
- Technology: MDB React
- MDB Version: 5.0.1
- Device: PC
- Browser: Chrome
- OS: Ubuntu
- Provided sample code: No
- Provided link: No
shmeltex pro premium priority commented 4 years ago
It kind of supports React 17. I asked a similar question here https://mdbootstrap.com/support/react/install-react-pro-5-0-1/. Using --legacy-peer-deps flag you can install v5 with React 17, not clear how well it will work due to not all dependency packages providing support for React 17
Piotr Glejzer staff commented 4 years ago
We remove all legacy code from React 16. We use libraries that used React 16+ which can be a problem with that. If you see some problems with something let me know. We will try to remove all unnecessary dependency soon but we don't have an ETA for that.