Topic: React 17 Compatibility

thehotginburns premium asked 3 years ago


Are MDB v5 components compatible with React version 17?


shmeltex priority commented 3 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 3 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.


Krzysztof Wilk staff answered 3 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!


Nates premium answered 3 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


Nates premium answered 3 years ago


Is there an ETA now on making MDB React compatible with React 17 please?



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Premium
  • Premium support: Yes
  • Technology: MDB React
  • MDB Version: 5.0.1
  • Device: PC
  • Browser: Chrome
  • OS: Ubuntu
  • Provided sample code: No
  • Provided link: No
Tags