Material-ui compatibility with other non-mui react components

551 views Asked by At

Can I combine material-ui components with non-mui components without problems ? Are they compatible ?

If not, why not ?

2

There are 2 answers

1
Oleg Pro On BEST ANSWER

In general there are no obstacles to use in one app bouth Material-UI and other Components. The only thing you need to take in mind that mui components need to be wrapped into MuiThemeProvider, so you need to organize your app structure to cover them all.

An additional issue may occur if you're going to create the themable app. You'll find that your non-mui components don't follow theme colors. In that case you can try to use react-theme-provider which solves common issues about it.

0
ogm On

Usually ui components can work pretty well together. I know that some material ui component werent composable you had to pass props to customize them instead of putting component as childs but they have been working on that and you can customize with your own components more and more.