Hi all,

I was working on a react project where I had to use some components from
Material-UI 0.20.1 and another component from Material-UI 1.3.0

There were some clashes as some of the sub components used in those
components are not supported in the latest versions.
For an example, I had one component which used 'FlatButton' inside it, but
the 'FlatButton' is no longer exists in newer versions.

I found following doc where we can use Older (V0.x) material-ui components
inside newer (V1.x) components, which might help you.
https://material-ui.com/guides/migration-v0x/

Simply, you can import two versions and use them one within another as
mentioned below:

import { MuiThemeProvider, createMuiTheme } from
'@material-ui/core/styles'; // v1.x
import { MuiThemeProvider as V0MuiThemeProvider} from 'material-ui';

return (
    <MuiThemeProvider theme={theme}>
        <V0MuiThemeProvider muiTheme={themeV0}>
            {/*Components*/}
        </V0MuiThemeProvider>
   </MuiThemeProvider>
)

Hope someone finds this useful.

-- 
Thanks and Best Regards,
Thisaru Guruge
Software Engineer
Mobile: +94 71 720 9720


WSO2 Inc.: http://www.wso2.com
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to