Jean-Yves Delmotte
Jean-Yves Delmotte

Reputation: 106

Cannot upgrade Material-Ui Version from 0.14.4 to 0.15

I'm trying to upgrade Material UI from 0.14.4 to 0.15.0.

I have a custom theme and I'm following the changelog to avoid any error.

However, i'm facing a problem in the process.

Here are some screenshots of the problem. Does someone know where it comes from and how to fix it?

enter image description here

Here is the code where the 'Uncaught TypeError' come from :

enter image description here

thanks in advance for anyone having an insight/solution to my problem

Edit : Here is my code

import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'
import getMuiTheme from 'material-ui/styles/getMuiTheme';

let MainApp = React.createClass({/*...*/});

ReactDOM.render((
    <MuiThemeProvider muiTheme={getMuiTheme()}>
        <MainApp />
    </MuiThemeProvider>
), document.getElementById('react-root'));

Upvotes: 1

Views: 338

Answers (1)

Edgesoft
Edgesoft

Reputation: 282

You need to add this to your code

static contextTypes = {
  muiTheme: React.PropTypes.object
}

Add it where you need to access the muiTheme.

Since we both have updated our questions and answers the comments are not valid any more

Upvotes: 1

Related Questions